15
votes

I have a new install of Excel 2016, that hates CSV files. It opens them with everything in one column flagpole style, down column A, with commas and speech marks visible.

Salient points:

  1. I have two machines, desktop and laptop, both running same version of Excel. Desktop works fine, opens the same problem files formatted correctly.

  2. I can create CSV files on laptop, save those, open them again on laptop, and it's fine.

  3. Even opening it in Notepad++, saving in the hope of some sort of file format normalisation, and still no good.

  4. I have compared regional settings and almost all settings in Excel.

  5. I tried renaming the file to TXT, it brought up the text file conversion dialogue, I chose comma delimited. First time it ignored that, still got everything in column A, second attempt, that actually worked, however, that is a pants solution, I want to be able to just natively open CSV files without saving as TXT, I use many different ones every day.

Anyone got any ideas?

Thanks in advance.

12

12 Answers

21
votes

CSV files are character separated value files, not necessarily comma separated. For more than half the world the separator character is a semicolon (;), not a comma (,)

Excel 2016 properly respects your Windows regional settings, and uses the specified List Separator character

One solution is to change your regional settings for the List Separator attribute to the character you want Excel to default to using, e.g. a comma (,)

This can be changed in the operating system Control Panel, under Region settings, Additional Settings, List separator

For various reasons some people seem to have the incorrect regional settings for the culture they most commonly work in, and therefore have semicolon as the default separator

If you prefer not to change your operating system regional setting to what you think is normal for CSV files, you can change the default behavior in Excel with the Use system separators checkbox under the File/Options/Advanced menu

If you want custom options each time you open a CSV file, use the Data/From Text menu, but this becomes slow and awkward for lots of files

CSV References:

20
votes

I've found a way of saving messy CSV files into a nice table format but I'm not sure if it will work for your case.

Data -> New Query -> From File -> From CSV

By opening the CSV file this way, a pop-up 'Query Editor' window will appear with a nicely organised table format where you can edit, save and load into your excel sheet.

I hope this helps.

8
votes

For me the solution was to:

Data > From Text > Choose your csv file

Then you can define all the import settings for csv files.

4
votes

I found another way to fix this, without changing your windows local settings. In Excel, you go to File > Options > Advanced. Un-check the "Use System Separators" within the Editing Options and change the Decimal separator with "," and the Thousands Separator ".".

Even it does look more like a bug than a feature of Excel 2016, it works without changing the Windows Local settings, and it's just a local Excel change.

4
votes

Just had this same problem. Changing the file extension from csv to txt and opening in Excel brings up the classic wizard so you can map the strings to fields.

1
votes

I have quite a complex csv file where none of the suggestions worked out for me. So I ended up using LibreOffice Calc for the job. It worked like a dream.

0
votes

The correct answer is to edit your regional settings as suggested above (if a long term change in behavior is desired)

Control Panel -> Region -> Additional Settings -> List separator:

But for my purposes a simple Edit -> Find and Replace using Notepad to replace all commas with semi-colons was a quick and dirty solution that I preferred.

Despite the comment that csv means 'Character Separated Values', in Office 2016 my .csv file association to Excel still says 'Microsoft Excel Comma Separated Values File'.

0
votes

I had the same issue on Mac OS X El Captain. The answer given here worked for me. Reproducing it here in case the link doesnt work in future:

  1. Close the Excel application
  2. Click on the Apple button
  3. Select System Preferences
  4. Select Language and Region
  5. Click Advanced
  6. Change the Decimal separator from a comma (,) to a full stop (.)
  7. Then click on Ok/Save
  8. Test the Excel import again
0
votes

When changing the list separator, make sure it doesn't overlap with the decimal symbol and the digit grouping characters. I had to change my list separator to (,) my decimal to (.) end my digit grouping to ('). Now .CSV opens lekker!!!

0
votes

In my excel, it's: data> get data> from file> from text/csv

0
votes

I had the same problem, I fixed it in this way (Excel 2020)

Data -> Text to Columns

Now you can configure as you wish the CSV delimiters/endlines...

Text to Columns

-2
votes

Try opening in excel, then using text to columns, based on commas. You could probably create some simple vba to open it in that way too.