xlsx converting large numbers to scientific when saving as a csv file

TERI RICE 40 Reputation points
2026-11-16T17:56:40.7133333+00:00

I have ID numbers that are 18 digits long. I am formating the column to Text, but when I save the file from an xlsx to a csv file, it changes the column to scientific, drops the last 5-10 digits and replaces them with zeros. How do I stop this? This is happening across multiple versions of Excel.

Microsoft 365 and Office | Excel | For business | Windows

2 answers

Sort by: Oldest
  1. Chris-D 2,710 Reputation points Independent Advisor
    2026-11-16T18:15:11.6033333+00:00

    Hi TERI,

    Thank you for sharing your concern.

    This happens because Excel supports only 15 digits of precision for values recognized as numbers. Therefore, an 18-digit ID may be displayed in scientific notation, and digits after the 15th position may be replaced with zeros.

    Formatting the column as Text after the IDs have already been entered or imported will not restore any digits that Excel has already changed.

    To prevent this issue:

    1. Format the destination column as Text before entering or pasting the IDs.
    2. If importing the data, use Data > From Text/CSV and set the ID column’s data type to Text during the import.
    3. After saving the file as CSV, verify it using a text editor such as Notepad rather than reopening it directly in Excel. CSV files do not retain Excel formatting, and Excel may automatically interpret the IDs as numbers again when the file is reopened.
    4. Keep the original .xlsx file as a backup before exporting it to CSV.

    If the existing IDs already end in zeros, you will need to retrieve the original values from the source data or a backup, as the lost digits cannot be recovered from the affected Excel file.

    For additional guidance, you may find these articles helpful:

    I hope this information is helpful. Should you have any further questions or need additional assistance, please feel free to share them in the comments below. I will be happy to help.  


    If the answer is helpful, please click "Yes" and kindly upvote it.

    Note: Follow the steps in the forum documentation to enable email notifications if you want to receive email notifications related to this topic.

    Was this answer helpful?

    1 person found this answer helpful.

  2. Andreas Killer 143.6K Reputation points Volunteer Moderator
    2026-11-18T06:01:12.3+00:00

    Teri,

    To summarize this clearly for future reference and get straight to the point:

    Excel preserves all digits of large numbers if
    a) the cell is formatted as text before the number is entered,
    b) the number is imported as text,
    c) the number is preceded by an apostrophe.

    Example file:
    https://www.dropbox.com/scl/fi/7x90cf16smrf8wsc757d2/6073427.xlsx?rlkey=ivto4k0oqmpsl6ogp7u8glz4d&dl=1

    Even small numbers with many leading zeros, displayed due to cell formatting, do not lose any digits when saved as CSV file!

    Example file:
    https://www.dropbox.com/scl/fi/qzqgr8p31xdwj3r97dp9e/6073427.csv?rlkey=wabl2v7qnmh946g4qiffmj2r8&dl=1

    It is only when you open the CSV file in Excel that conversion occurs, causing digits to be lost! Check the file using Notepad, and you will see for yourself.

    In newer versions, there is an option to disable this conversion during open. In older versions, you must import the CSV file, for example, using Power Query, and specify the data type for the column as "text."
    https://support.microsoft.com/excel/keeping-leading-zeros-and-large-numbers

    Andreas.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.