![]() |
Replacing last digit with Zero
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 |
Replacing last digit with Zero
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 |
Replacing last digit with Zero
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 -- Gary's Student "Fish" wrote: 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 |
All times are GMT +1. The time now is 11:04 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com