14
votes

Funny thing when I want to save Excel columns with long numbers like below, resulting csv contains converted numbers to scientific notation which is unusable. I want them to be save as text. Any trick to do that?

28160010390002003505456159  
12160010390002003505456156  
39160010390002003505456155  
39160010390002003505456155  
8
format the column as text - dav1dsm1th
Prepend the values with ' - Tim Williams
@TimWilliams your reply helped me, Thank you - Anil Kumar

8 Answers

9
votes

In order to have those long (>15 digit) numbers in Excel, they are already formatted as text. I suspect that the .csv file also shows them as long numbers (if you open the csv file with Notepad), but that when you open the csv file in Excel, you see them as truncated and converted to scientific notation.

If that is the case, what you need to do is IMPORT the csv file. When you do that, the text-to-columns wizard will open, and allow you to format that column as text. The location of the Import is different in different versions. In Excel 2007, it is on the Data ribbon, Get External Data / From Text.

enter image description here

enter image description here

35
votes

Append a TAB char (ASCII 9) at the end of a number.

8
votes

put the number as a function like below: ="123456789123456789"

5
votes

If, as the original question seems to imply, you are actually:

  1. already working with data in Excel, and
  2. want to save to a CSV format without losing digits in an extra long number,

Then, before doing a 'Save As' to your CSV format, try formatting the column with a custom format, and in the box for the pattern just type #. This will force Excel to see it as a number, however many digits long, without trying to do something else with it like 4.52364E+14 when you actually save it to CSV.

At least, that is how it works for me in Excel 365 at this point in time.

If you are trying to get data into Excel from a CSV, then the answer about using the data import wizard is probably the safest bet instead.

4
votes

This is an old question, but since at the moment it's still the top result on a google search for the topic, I think the thread should be kept current. Hussein mahyoub provided the only real answer to the question, yet has not gotten the up-votes.

The answer which tells us to add a tab character after your number gets you an string of text with a tab after it inside excel. It looks visually correct, but, it's not correct inside the spreadsheet. If the intent is to use the data in excel as excel data and use formula etc, it could cause problems. Interestingly if you put the tab before the text, it shows up in the data after the text.

The answer which tells us inserting a ' before the text gets a ' in the excel file. It's visually an incorrect representation of the data.

The answer which boasts the virtue of openoffice is simply an evil troll which does not even attempt to answer the question.

The answer that explains how to import a CSV that has not been properly formatted is good information, but, off topic.

The direct answer to the question is

converted to text,largest number
="123456789012",12345678901
2
votes

Convert the numeric to text using text function.

Text(number,"0")
1
votes

using openoffice you can save in csv format without problems.

0
votes

Don't use Export to csv feature in Excel.
You can easy format that column to number in Excel, then use "Save as" it with csv and "yes" to confirm that you want to keep the format in csv.
That is work for me enter image description here enter image description here