Replacing last digit with Zero

G

Guest

I have a CSV file that has 16 digit numbers in it, when I open the file Excel
replaces the last digit with a zero. Saving it as an .xls file and changing
the format to allow for a 16 digit number still gives the same results. If I
open the file in notepad I can see the proper numbers in there. if you type
in 1234567891234567 it will display it as 1.23457E+15, then when you change
the format it replaces the 7 with a zero.

Thanks, Jim
 
V

vezerid

Jim,
this is because Excel supports up to 15 digits in precision. Digits
beyond the 15th are truncated.
Try formatting the destination cells to Text (Format | Cells... |
Number tab, choose Text). The imported data should be stored as text,
no digits will be lost. However, if you attempt to use them in
numerical calculations, the calculation will only take into account the
15 most significant digits.

HTH
Kostis Vezerides
 
G

Guest

When Excel opens your .csv file it is converting the 16 digit number string
into an integer. If your .csv file has very long strings of digits, rename
the file to .txt. When you open the .txt file, Excel will present you with
an import wizard. Tell the wizard that the long digit strings are a text
field
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top