A supplier sends a CSV with product code 00123. Someone opens it in a spreadsheet, saves it and sends it back as 123. Both people think they handled the same five-character code. The receiving system disagrees.
When a spreadsheet imports a CSV, it may interpret an identifier as a number, date or other type. That can remove leading zeros, change the display or lose digits in a long number. Preserve the original file, choose appropriate column types during import and compare the result with the source before using it for matching or upload.
A product code can contain digits without being a quantity. Treating those digits as an identifier is often the difference between finding the right item and creating a very confusing duplicate.
Keep the original first
Save an unchanged copy of the file received from the sender, with its date and source. Work in a separate copy or import process. Before opening it in a spreadsheet, identify which columns contain codes, postal codes, account references, dates, amounts or free text. Decide which values must be preserved exactly and which should be calculated.
Check the expected format with the sender or receiving system. Is a product code always five characters? Can two distinct identifiers differ only by leading zeros? Is a long reference a number used in arithmetic or a label that happens to contain digits? Do not invent a fixed width because one example happened to have five characters.
A CSV is a text-based exchange format; it does not carry all the formatting and type information of a spreadsheet workbook. The application opening it may infer how to interpret each field. Different applications, versions and import settings can make different choices.
Why the zero disappeared
If the source contains 00123 and the spreadsheet interprets it as the number 123, the leading zeros are no longer part of the stored numeric value. A display format can show 00123 again if the correct width is known and the number has retained its meaningful digits, but that display alone does not establish what the receiving system will get after export.
Microsoft’s guidance on leading zeros and large numbers explains importing identifier columns as text and the limits of formatting after conversion. Its instructions apply to the listed Excel versions. Other spreadsheet applications have their own import controls and may behave differently.
Where supported, use the import preview or data transformation tool to designate identifier columns as text before they are converted. Review any automatically applied type-change steps: changing a column to text after a prior conversion may preserve the already altered value rather than recover the original. If the result is wrong, return to the unchanged source and import again with the correct interpretation.
Long numbers have another trap
Microsoft states that Excel stores numeric values with a maximum of 15 significant digits. A 16-digit identifier treated as a number can therefore lose information. Formatting the cell as text afterward cannot reliably reconstruct digits already lost. Keep identifiers as text from the start and compare them with the source.
For an illustrative reference, the strings 1234567890123456 and 1234567890123457 are different identifiers. Do not test them by subtracting or rounding them. Verify that each complete string survives the import and the subsequent export. Avoid using real payment-card, identity or customer numbers in a test file.
Scientific notation can be a display of a numeric value rather than proof that every original digit is preserved. Widening a column may change what you see, but it does not restore digits that were lost during conversion. The source file is the place to check.
Dates, separators and language settings
An entry such as 03/04/2026 can mean different calendar dates under different conventions. An identifier such as 1-2 can also be interpreted as a date by some spreadsheet settings. Agree on the source format and the receiving system’s expected format before converting. When a value is genuinely ambiguous, ask the source owner rather than guessing.
Check the delimiter and character encoding in the import preview. A comma inside a quoted field, a semicolon-separated file or accented characters can expose a parsing problem if the application uses the wrong settings. Microsoft’s text and CSV import instructions describe selecting a delimiter and using an import or transformation workflow. The available options can vary by version.
Do not turn every column into text indiscriminately. Amounts and dates may need to be typed for calculations, but the conversion should follow a documented format and be checked against the source. Keep identifiers separate from numeric measures.
Compare before the file goes anywhere
Check row counts, column names and a sample of values that exercise the risky cases: leading zeros, long identifiers, blank fields, accented characters, embedded delimiters and dates near a month boundary. Compare exact strings with the original, not just the way cells look on screen. For a critical upload, use a validated comparison appropriate to the data and the organization’s controls.
Then test the exported file in the intended destination or its supported preview. A workbook can display an identifier correctly while the export or receiving system changes it. Confirm the destination’s actual import result before treating the job as complete.
If a value is already damaged and the source is unavailable, do not guess the missing digits or add zeros based solely on a familiar pattern. Find an authoritative copy or ask the sender. A plausible-looking identifier can be more dangerous than a visibly missing one.
Before importing the next CSV
- Is an unchanged source copy retained?
- Which columns are identifiers that must stay as text?
- Are long references and leading zeros preserved exactly?
- Are date conventions, delimiter and encoding confirmed?
- Were automatic conversions reviewed before loading?
- Does the destination show the expected values after a test import?
A spreadsheet is allowed to be helpful. The import process still needs to know which values are labels and which are numbers.
Explore Infinite Upside
For Vijay Sheth’s personal accounts, read Infinite Upside: Building Wealth With Room to Live, published by Sheth Capital, Inc.
Explore more practical guides
The Reading Room