Q: Numbers does not import CSV files properly
Using Numbers v 3.6.2 under OS X El Capitan v 10.11.6 CSV files are not imported correctly. A file with 8 columns appears in Numbers as two columns with the first containing data from 7 columns and the second containing the data from the remaining column. This does not happen with Numbers v 2.1 which I have on another Mac running OS X v10.6.8
Alright I know one answer would be to always to download to the latter Mac but I am trying to stop using this once all data that I need is available on the other, later, Mac.
If Apple could provide a program that does the job correctly why on earth can't a later version do the same, it's a basic requirement and I don't want to play around trying to sort it out I just want it to work as it ought to.
iMac (27 inch), OS X El Capitan (10.11.5)
Posted on Aug 24, 2016 4:36 AM
Trying the script will take you less than a minute. Copy-paste-click and you're done. Why not give it a try? It's really easy to try and it might let you get work done in the meantime. It works on the sample you posted.
Note that the sample you provided here also confuses Excel, which is really good at parsing CSV files. That is a pretty good indication that something went wrong with the file.
CSV (character-separated-values) is a loose standard. If the delimiter character is a comma, straight double quotes are needed around values that include a comma within them. If the delimiter character is a semicolon ; quotes are needed around values that include a ; within them. Including quotes around a value even when not needed typically doesn't confuse parsers.
The quotes do typically have to be straight, not curly. How you ended up with curly quotes in your file isn't clear. It could be you opened it in an app, Numbers or TextEdit or many others on the Mac, where you Smart Links turned on in the Edit > Substitutions menu. Best to turn that off when working with CSV files.
Anyway, give the script a quick try. It might do the trick.
SG
Posted on Sep 1, 2016 6:56 AM
