Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Create Custom Names for CSV File

$
0
0

Summary: Use Windows PowerShell to create custom column headings.

Hey, Scripting Guy! Question How can I use Windows PowerShell to generate custom heading for a CSV file when I import it?

Hey, Scripting Guy! Answer Specify the –Header parameter as an array of names in the order of the fields, for example:

Import-CSV c:\fso\myfile.csv –delimiter “:” –header ‘FName’, ‘LName’, ‘Street’, ‘City’, ‘State’, ‘Zip’


Viewing all articles
Browse latest Browse all 3333

Trending Articles