none
rename or delete columns in csv file RRS feed

  • Question

  • hello 

    I have a csv file that has two columns with the same name. I can't use Import-Csv (errors out because of same column names). Get-Content allows me to read the file but I'm trying to figure out how to rename/delete the column that I dont need. Once done, I'd like to reimport the file using import-csv and process

    thanks in advance

    Friday, December 11, 2015 9:03 AM

Answers

  • import-csv file.csv -header c1,c2,c3,c4 ...


    \_(ツ)_/

    • Marked as answer by Fiyo Saturday, December 12, 2015 1:51 AM
    Friday, December 11, 2015 9:23 AM

All replies

  • import-csv file.csv -header c1,c2,c3,c4 ...


    \_(ツ)_/

    • Marked as answer by Fiyo Saturday, December 12, 2015 1:51 AM
    Friday, December 11, 2015 9:23 AM
  • import-csv file.csv -header c1,c2,c3,c4 ...


    \_(ツ)_/

    Thanks heaps jrv, it works like a charm 
    Saturday, December 12, 2015 1:52 AM