Excel drops leading zeros and turns long numbers into 1.23E+11
Excel turns anything that looks like a number into a number when it opens a CSV, so 00123 becomes 123 and 123456789012 becomes 1.23E+11. MegaCSV never converts values: it shows exactly what’s in the file, and keeps IDs as text when it exports to Excel.
Why it happens
A CSV has no types; it’s all text. Excel guesses a type for each value on open. Postal codes, phone numbers, account numbers and product codes lose their leading zeros, and long numbers are shown in scientific notation or rounded to 15 digits. Saving the CSV from Excel writes the changed values back.
Fix it with MegaCSV
- Drop the file on MegaCSV. Values appear as written:
00123stays00123. - Filter or Find as needed.
- Export: as CSV (an exact copy of the rows) or as Excel, where codes and long numbers are written as text.
Fix it in Excel
- Data → From Text/CSV → Transform Data, then set those columns to Text before loading.
- Or, in Excel 365, turn off File → Options → Data → Automatic Data Conversion options for leading zeros and long numbers.
Questions
Does MegaCSV ever change a value?
No. It displays exactly what's in the file, and CSV exports copy rows byte for byte.
Will the zeros survive an Excel export?
Yes. MegaCSV's Excel export writes IDs, codes and long numbers as text, so Excel shows 00123 and full 16-digit numbers.
Why are my 16-digit numbers ending in 0?
Excel stores numbers to 15 significant digits, so the 16th digit and beyond become 0. Keep such values as text.
Related
Facts checked November 2, 2026.