
AI-generated editorial illustration.
A CSV can distinguish 00123 from 123. Open the file in a spreadsheet that treats both fields as numbers and the two identifiers can collapse into one. Protect the field type during import, before a format change hides what happened.
Inspect the original file as text
Use a plain-text editor to inspect a copy of the source. For a small example, make a CSV with the headings ItemCode and Quantity. Enter three records: 00123 with quantity 7, 123 with quantity 9, and 00007 with quantity 2. There are three distinct codes. Their quantities add to 18, but that total alone would still look right if two item codes became indistinguishable.
Which column should support arithmetic? Quantities should. Item codes should support exact reproduction and lookup. Ask an assistant to turn the header descriptions into an import plan, using the sample instead of your catalog. The plan should specify a text field for ItemCode and a numeric field for Quantity. A consistently numeric-looking column can still be an identifier. Check the source system's definition before accepting any automatically inferred type.
Putting quotes around a value in CSV helps delimit the field. It does not provide a portable instruction that every spreadsheet importer must preserve it as text. Keep the original file separate so you can repeat the import if an application makes the wrong choice.
Set the identifier column to text during import
In desktop Excel for Windows with Power Query, start at Data, then From Text/CSV. Select the file and choose Transform Data. Inspect the applied steps before loading. If automatic type detection inserted a Changed Type step that converted ItemCode to a number, remove or edit that step first. Set ItemCode to Text while the source still contains its original characters. Then set Quantity to a suitable numeric type and load the result into a new sheet. Microsoft's guide to leading zeros and long numbers and text and CSV import guide describe the available Excel routes.
For a small Google Sheets example, use a fresh tab on a computer. Format column A as Plain text before pasting a two-column, tab-separated copy of the sample from a text editor. Paste the original textual values directly, without passing them through another spreadsheet that has already interpreted them. Check A2 in the formula bar and run the tests below before using this route on a larger file.
Prove the two codes stayed different
With the headers in row one, =LEN(A2) should return 5, =LEN(A3) should return 3 and =EXACT(A2,A3) should return FALSE. The last item code has five characters, including its four leading zeros. Check that =SUM(B2:B4) returns 18 as well. Together these checks cover the spelling of your keys and the arithmetic of your measures.
If 00123 already became 123, formatting the cell to display five digits may produce the expected appearance while disguising the original distinction. Padding every code to length five would also transform the genuine three-character code. Reimport from the raw file unless a documented fixed-width specification establishes what each value must be. The dataset preparation guide offers a place to capture that specification for later imports. Finally, reopen an exported copy in a text editor and compare the identifier strings with your original example, especially if another team will ingest the CSV.
Read our guide on auditing a spreadsheet with AI.
Popular news

Soitec jumps 6.9% as European chip stocks rebound and Eutelsat falls

Ant Group releases a design image model that tops the open-weight ranking

Perplexity lets developers search the web as it looked on an earlier date

OpenAI starts testing Private Inference with a small group of customers

Google’s Cogentic AI generated six new math papers. What can others check?

