Import-CSV Error : Cannot process argument because the “name” is invalid

I got this error from a CSV file that I had exported from Excel. The file was correct, Excel looked good, but there were extra columns on the right-hand side of the Excel data. I opened up Excel, deleted the extra columns, re-exported to Tab text file, and problem gone.

The underlying issue is that the Column headers are blank. Import-CSV does not like this, hence the invalid “name” notification.

Advertisements

Tags:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: