Correctly Importing Excel CSV Files

by Jan 4, 2018

If you have exported an Excel sheet to CSV and would like to import this file into PowerShell, here is how to do this:

$path = 'D:\sampledata.csv' Import-Csv -Path $path -UseCulture -Encoding Default 

The important options are –UseCulture (to automatically use the same delimiter that Excel used on your system) and –Encoding Default (only with this settings will all special characters stay intact).

Twitter This Tip! ReTweet this Tip!