Excel Shows Long IDs as 1.23E+17: Preserve Them as Text
Why Excel converts long IDs to scientific notation, how to prevent precision loss, and how to validate identifiers before publishing data.

Excel shows an identifier such as 123456789012345678 as 1.23457E+17 because it has interpreted the value as a number. Under the General format, Excel uses scientific notation for large numbers of 12 or more digits (Microsoft Support).
The display is not the main risk. Excel has a maximum precision of 15 significant digits. If it treats a 16-, 17- or 18-digit identifier as a number, digits after the 15th are replaced with zeros (Microsoft Support).
Identifiers should normally be text, even when they contain digits only. Publication IDs, product codes, record keys and codes with check digits are labels—not quantities to add or average.
Determine whether the problem is display or data loss
Scientific notation does not always mean the identifier is damaged.
| Source identifier | Possible Excel result | Interpretation |
|---|---|---|
9780306406157 |
Displayed as 9.78031E+12 |
Usually a display issue; all 13 digits can be retained |
123456789012345 |
Displayed in scientific notation | All 15 digits can still be present |
123456789012345678 |
Stored as 123456789012345000 |
Digits after the 15th have been lost |
To inspect a cell, apply Number format with zero decimal places and widen the column. Compare the result with the authoritative source—not merely another copy of the same workbook.
If a long ID now ends in zeros or differs from the source, changing the existing cell to Text will not recover it. Text formatting affects values entered afterward; it does not restore digits already removed (Microsoft Support).
Do not use Set precision as displayed as a repair. That workbook option changes stored numbers to their displayed values. Microsoft warns that discarded accuracy cannot be recovered (Microsoft Learn).
Preserve identifiers entered or pasted into Excel
Format the destination before adding the data:
- Select the identifier column.
- Press Ctrl+1 to open Format Cells.
- Choose Text, then OK.
- Paste or type the identifiers.
For an occasional value, enter an apostrophe first, as in '123456789012345678. Excel treats the digits as text; the apostrophe is an input prefix rather than part of the displayed value (Microsoft Support).
Excel’s Automatic Data Conversions controls can also prevent numerical text from being truncated to 15 digits. Microsoft documents this feature for Excel for Microsoft 365 and Excel 2024, including their Mac editions. Preformatting the column or assigning an explicit import type is still easier to reproduce and audit.
Import a CSV without losing digits
Avoid opening an identifier-heavy CSV by double-clicking it. When Excel opens a CSV directly, it uses its current default data-format settings to interpret each column (Microsoft Support).
Import it with an explicit type instead:
- Open a blank workbook.
- Select Data > From Text/CSV and choose the file.
- From the preview, open the file in Power Query with the edit or transform option.
- Select every identifier column and set Data Type to Text.
- Select Close & Load.
Power Query automatically detects types for CSV and text files by default. Check its generated Changed Type step and confirm it has not assigned an identifier column a numeric type (Microsoft Support).
If conversion has already damaged an ID, return to the authoritative source and import it again as text. The missing digits cannot be inferred from the workbook.
Validate the column before publishing
For a required 18-character identifier in A2, use:
=AND(ISTEXT(A2),LEN(A2)=18)
To extract the final character for comparison with a documented check digit:
=RIGHT(A2,1)
These formulas check storage type, length and the final character. They do not prove that the ID was issued correctly. Apply the identifier system’s documented validation algorithm where one exists, and compare a sample with the source. Also check for blanks and duplicates.
After exporting to CSV, inspect the raw file in a plain-text editor. Check records from the beginning, middle and end, especially IDs that differ only in their final digits. Do not validate by reopening the CSV directly in Excel, because that can repeat the same conversion.
Keep the correctly typed XLSX workbook as the working master and treat the CSV as a publication copy. Then validate its column types before publishing.
Finally, exact storage does not make an identifier safe to publish. Exclude account, tracking, personal or other sensitive identifiers unless the values are deliberately public and their release is appropriate. The expected result is a public-safe identifier column containing exact text values that downstream systems can sort, filter and join without silent digit changes.