Sorry to post this, but I can't figure out how to do such a basic thing, how to rename a column header in a csv file using windows powershell. I can add new ones, delete, fill out, export, but I canβt find out how to change the title.
I thought it was possible to import the CSV and export with the specified header, but it does not work:
import-csv c:\tmp\test.csv | Select-Object first_name | Export-Csv -header "test" c:\tmp\test1.csv
I basically need to reformat the CSV file, so if I can select the data I need and specify new headers that would be ideal.
Of course, this should be straightforward. I have to miss something obvious ....
source share