Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

preventig numbers ending in zero from converting to scientific notation when exporting to csv

I need to convert a sheet with a column of of 16 digit numbers to a csv file and keep the numbers formatted in plain text. ive formatted the column as text.

When I export to the data into a csv file, most of the cells in the column are unaffected, but numbers that end in zero convert to scientific notation. I would like to prevent the conversion to scientific notation for the numbers ending in zero.

Posted on Aug 25, 2022 2:10 AM

Reply
Question marked as Best reply

Posted on Aug 25, 2022 3:33 PM

You could try padding those "numbers" with a leading or trailing space character or non-numeric character and see if that makes any difference. I do not know how this will affect whatever those "numbers" are being used for but, hopefully, it will force your app to treat them as text.


This is what I see going on:


The CSV is not the problem. The CSV will have the characters that make up those numbers; the same characters you see on the screen. You can view the CSV file with TextEdit to see what it looks like. It will not have it in scientific notation.


I am not familiar with what you are using to view/read the CSV but it appears to me that it is the problem. My guess is that the second number is being treated differently because it has 15 digits followed by a 0 vs the first one that has a non-zero 16th digit. 15 digits is an acceptable number (16 digits is not) so the app being used to view the CSV is dropping the trailing 0 and turning it into an exponential number. It is treating the 16 digit "number" as text




7 replies
Question marked as Best reply

Aug 25, 2022 3:33 PM in response to travi7997

You could try padding those "numbers" with a leading or trailing space character or non-numeric character and see if that makes any difference. I do not know how this will affect whatever those "numbers" are being used for but, hopefully, it will force your app to treat them as text.


This is what I see going on:


The CSV is not the problem. The CSV will have the characters that make up those numbers; the same characters you see on the screen. You can view the CSV file with TextEdit to see what it looks like. It will not have it in scientific notation.


I am not familiar with what you are using to view/read the CSV but it appears to me that it is the problem. My guess is that the second number is being treated differently because it has 15 digits followed by a 0 vs the first one that has a non-zero 16th digit. 15 digits is an acceptable number (16 digits is not) so the app being used to view the CSV is dropping the trailing 0 and turning it into an exponential number. It is treating the 16 digit "number" as text




Aug 25, 2022 4:18 AM in response to travi7997

I can't reproduce that behavior here. Can you post a screenshot of values you are trying to export? shift-command-4, select area on screen with crosshairs, release, start new post here, and use the 'mountains-and-moon' Image Insertion icon below the compose window to attach the image from the Desktop.


SG



Aug 25, 2022 8:54 PM in response to travi7997

The scientific notation format is likely being applied by the receiving app. It's not a function of how Numbers exports, or of the csv data itself.


So I would look into how to format numbers on the receiving end. It's probably just a matter of a few clicks. It may even be just a matter of widening the column a little.


SG



preventig numbers ending in zero from converting to scientific notation when exporting to csv

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