Numbers 3.1(1769) Crashes opening a simple CSV

Latest build of Numbers will crash opening a CSV if the last line of the csv is not terminated with a <CR>.


In previous builds Numbers could handle this condition just fine.

MacBook Pro, OS X Mountain Lion (10.8.2), 15" i7 8GB

Posted on Jan 30, 2014 8:17 AM

Reply
26 replies

Jan 30, 2014 10:42 AM in response to darmitage

The issue I described is unique to build (1769 ) I believe. And it is completely repeatable.


For example...here is a link to a small csv which has not <CR> in the last line


https://drive.google.com/file/d/0B_qGAhBcUwv1Q2tINlVUVVZrcDg/edit?usp=sharing


If you download and try to open in 1769 I believe you will experience the Numbers crash.

If you open with a text editor and add a <CR> the file will open fine.


And I believe that this is 'new' to the latest build.

Jan 30, 2014 12:53 PM in response to darmitage

The sample file is not well-formed csv because, as Jerry notes, it's missing the final double-quote on the last line.


It's not technically a bug because the import parser presumably is expecting well-formed csv. Nevertheless, it shouldn't crash the app. Excel's more robust import capability handles the sample file without complaining.


Hope you report the behavior to Apple via your menu Numbers > Provide Numbers Feedback, perhaps noting that the crash occurs whether the end-of-line character is set to Windows CRLF (as it appears to be in the sample file), Unix LF, or classic Mac CR.


SG

Mar 6, 2014 4:18 AM in response to SGIII

Dear SGIII,

I am having the same issue as was written in the original question: when I open a csv file in Numbers 3.1 (1769), Numbers crashes. I am a simple user and I don't really understand your solution. I did report my issue to Apple. Could you possibly help me out and describe in simple words/steps what I should in order to open the csv file in numbers?

I would be so grateful!

Thanks,

ZIrsi

Mar 6, 2014 4:20 AM in response to Jerrold Green1

Dear Jerry,

I am having the same issue as was written in the original question: when I open a csv file in Numbers 3.1 (1769), Numbers crashes. I am a simple user and I don't really understand your solution. I did report my issue to Apple. How do you 'add the final quote character to the last string'? I am a very simple user, hopefully you can explain in easy steps.

I would be so grateful!

Thanks,

ZIrsi

Mar 6, 2014 5:45 AM in response to zonirsi

Zonirsi,


CSV files are basically just text files formatted a specific way so that other applications, such as spreadsheets, can read them and turn them into separate pieces of data, such as columns and rows of values.


Quotes are sometimes used around text data. If there is an opening quote at the start of the text, it needs a closing quote at the end of it.The CSV file that Darmitage was trying to open was missing a quote character at the very end of the file, the closing quote for the last data point. That was the problem. Your problem may be the same or may be something totally different.

Mar 6, 2014 7:10 AM in response to zonirsi

csv file doesn't open with any quote (just with "Title","goal") so my problem is probably totally different.


That " before the Title is the opening quote. You could try opening up the file and seeing if there is a " after the last value too.


Bue even missing quotes should not crash the app, so hope you take time to make a report at Numbers > Provide Numbers Feedback in your menu.


SG

Mar 6, 2014 8:30 AM in response to zonirsi

How about try this simple test: Open your CSV file in TextEdit. Do a Find (command F) and search for the " character. It will give you the number of instances found. If it is an odd number, a missing quote may very well be your problem.


Download the problem file that was linked to in an earlier post. Open it in TextEdit and look all the way at the bottom right of the file. You will see it ends with a single quote character where there should be two (like all the lines above it)


I agree with SGIII that a missing quote should not crash the app. But it does. Maybe other problems do too. We can try to fix your file. If it is a file you can share, you can post it somewhere for us to downloador you can email it to some of us (some of us have our email addresses in our profiles).

Mar 6, 2014 8:34 AM in response to zonirsi

It sounds as if you have a malformed csv file. You could try this Automator Service (Dropbox download) to see if that works any better.


To install double-click the .workflow package and, if necessary, click 'download anyway' in System Preferences > Privacy & Security.


To use select the file in Finder, right-click, choose 'CSV to Tabs on Clipboard' under Services, then click once in a new table in Numbers, and control-v to paste.


You can remove it at any time by going to Library > Services (in Finder hold down option key and choose Go from the menu) and deleting the way you would any other Finder item.


SG


<This is a Direct Download Link>


<Edited By Host>

Mar 6, 2014 8:56 AM in response to Badunit

My result is 6600 quotes when I do a Find, so I guess that is all fine. I'm afraid I cannot upload the csv file here, it's not mine, it's from a client and it contains a lot of -confidential- employee data. Thank you Badunit.


I just installed the script that you sent a link to SG, and went to the file, right clicked 'CSV to Tabs on Clipboard' and it gives me this result:


User uploaded file

I am sure that it is a comma-separated file. In excel it allows me to separate by comma, but I really don't like working with excel, I am used to working with Numbers.


zonirsi

Mar 6, 2014 9:25 AM in response to zonirsi

That suggests the script thinks it's malformed too. I assume you picked the comma-separated option.


You could try opening the file in a text editor, copying the first few rows into a separate document, saving and opening that one in Numbers (and/or trying the script again). That can tell you whether the problem is right up near the top. Sometimes it's a simple matter of adjusting the line with the headers.


Excel is a champ at this particular operation. Very forgiving. If all else fails return to mother ship for a little while!


SG

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Numbers 3.1(1769) Crashes opening a simple CSV

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.