AI cleaned your CSV. Did product code 00123 become 123?
Treat identifiers as text before conversion, then compare exact values after import. A valid CSV file can still lose the distinction your codes need.
Tell AI which columns are identifiers rather than amounts. Product codes 00123 and 123 may refer to different items even though converting both to integers produces 123. Do not ask a cleanup to remove their leading zeros unless that is your actual rule.
Check the original characters
We parsed an invented CSV with codes 00123, 123 and 1234567890123456 using Python’s CSV reader. It preserved all three as strings. Deliberately converting the first two to integers collapsed them to the same number. This test checks the data distinction, not Excel’s behavior.
Import the identifier column as text
Microsoft’s guide explains that Excel can remove leading zeros or change long numerical text. It recommends assigning the relevant column the Text type during import with Get & Transform. Quoting a CSV field is not a substitute for checking how the receiving application imports it.
Give AI an explicit preservation rule
Suggested input: “Keep product_code as text, preserve every character and row order, and do not trim zeros or convert it to a number. Treat amount separately as numeric. Report values you cannot preserve.” This is an input suggestion, not a tested AI conversation.
Verify after loading, not just before saving
Compare the imported codes with the original values and check row count. Keep an untouched source copy. If zeros or digits were already lost, return to the source rather than inventing a repair from the shortened values. Microsoft notes that later formatting does not restore previously removed leading zeros.
Published October 14, 2026. Only fictional CSV parsing and intentional integer conversion were executed locally. Excel import and AI cleanup were not tested; import controls vary by version. No real product or customer records were used.
Sources: Microsoft · Leading zeros.