Search code examples
javaexcel

Excel is changing the digits after 15th to "0". Please suggest what to do in the same case


In the application, we are Exporting the data to Excel and saving it. Post opening the file, there is a column "Reference Number" which of 16 digits and it is displayed in exponential form.

After converting it into Number from Format Cells, it is changing it in Number Format but 16th digit is converted to "0". I tried to change it in text Format also but it is again converting it into exponential Form.

I tried to convert in number, text , customized form, etc. But Nothing is working. Please Suggest as I want the 16 digit Reference Number.


Solution

  • Numbers in Excel are stored a double precision (64-bit) floating point numbers. These have between 15 and 16 digits of precision. If you need numbers of that length or longer to be stored exactly, you must store them as text.