Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Get columns names in proper order from a CSV

$
0
0

Hi,

Is there a way to get the columns (headers) name of a CSV in the proper order

I'm been able to get the names using get-Member but the result is order alphabetically not in the proper of real order that in the CVS file

 

This is what I am doing!

$old = Import-Csv $oldFile -Delimiter ";" #Original file

$old | get-Member #|  where-object {$_.MemberType -eq "NoteProperty"}

Please Help!

Viewing all articles
Browse latest Browse all 6937

Trending Articles