Quirkiness of Excel 2011 for Mac, CSV's, and Powershell 3.0 import-csv

Summary:
Work on Windows or a Mac, don't cross the streams unless you're up against Gozer.

Details:
I made a CSV file using Excel 2011 for Mac w/ that looked something like this:

HeaderName, HeaderName2, HeaderName3, HeaderName4
Meh, super.meh.local, space, heckling
Sigh, super.meh.local, space, bashing

Saving this as a "Comma Separated Values" file was my first mistake cause when I tried to import this in Powershell, I would get the following super helpful error:

import-csv : The member "super.meh.local" is already present

To boil it down, I needed to save the CSV as a "Windows Comma Separated" csv file type.  The other method was that I could have placed quotes around all comma separated values via a text editor.


No comments: