Spreadsheet type-conversion problem
Stop Leading Zeros Disappearing from CSV Values
Preserve ZIP codes, account numbers, SKUs, and phone fields that begin with zero when opening or importing CSV data.
Use the matching tool
CSV Viewer
What the error actually means
CSV stores text, not spreadsheet cell types. When Excel sees 00127, it often guesses that the value is a number and displays 127. The source CSV may still contain the zeros; the damage often occurs during opening or saving.
Likely causes
- The spreadsheet automatically inferred an identifier column as numeric.
- The CSV was opened by double-clicking instead of imported with explicit column types.
- A previous spreadsheet save already removed the zeros.
- A formula or numeric conversion transformed the identifier.
Identifier treated as a number
Problem
ZIP displayed as 127Correct pattern
ZIP imported as text: 00127A safe repair workflow
- 1Inspect the original in the CSV viewer to confirm whether the zeros still exist.
- 2In Excel, use Data → From Text/CSV instead of opening the file directly.
- 3Set ZIP, SKU, phone, and account columns to Text in the import controls.
- 4Save a new copy and confirm the identifier length before uploading it elsewhere.
How to verify the result
A file that downloads successfully is not automatically a correct file. Check the result at both the structural and business-data levels:
- Known fixed-width identifiers retain their full length.
- Long account numbers do not switch to scientific notation.
- The exported CSV text still contains the leading zeros.
- A sample re-import matches the original values character for character.
Read the deeper guides
Stop Excel Changing Numbers in CSV FilesPrevent Excel from removing leading zeros, rounding long IDs, and turning codes into dates when you open or import a CSV.Why Won't My CSV File Open in Excel? (7 Fixes)Troubleshoot CSV files that won't open in Excel. Fix file associations, size limits, corruption, and encoding issues.