Notebook · 2026-09-16 · updated 2026-10-10
Why Excel changes CSV values
Why Excel drops leading zeros, rewrites dates, and shortens long IDs when it opens a CSV, and how to check the text first.
Excel is not a text editor. When it opens a CSV it guesses a type for each column. That guess is useful for arithmetic and damaging for identifiers, phone numbers, and dates that were already correct as text.
Leading zeros
ZIP codes, product SKUs, and account numbers are often stored as 00120. Excel sees digits and stores the number 120. The zeros are not hiding. They are gone. CleanCSV treats the cell as text and will not coerce it during trim, sort, or export. A numeric sort may order 00120 as one hundred twenty, but the cell still reads 00120. Check the downloaded file in a text editor if the column matters.
Dates
01/02/2024 is 2 January in one locale and 1 February in another. ISO dates such as 2024-01-03 are less ambiguous, but Excel may still display them in the local date format and save that display back out. A value such as 2024-13-99 looks like an ISO date and is not a real day. CleanCSV reports those patterns and does not rewrite them.
Long numbers
Identifiers longer than Excel's numeric precision become scientific notation or rounded digits. If the value must come back unchanged, it has to stay text. Opening the CSV in CleanCSV or another text tool shows the digits that are actually in the file.
Formulas and the UTF-8 BOM
A cell that starts with = may run as a formula when Excel opens the file. That is a separate problem from type guessing, described in What is CSV formula injection?. A UTF-8 BOM does not stop type guessing. It only helps Excel pick Unicode instead of a legacy code page, so names with accents survive.