How do I keep leading zeros when importing a CSV for shipping or inventory?
Read identifiers as text before the spreadsheet converts them. Check the raw file first, set the column type during import, and test the exported value in the receiving system. ZIP Codes and customer IDs often look numeric even though their exact characters matter.
Auf Deutsch lesenStep-by-step walkthrough
Make a tiny file with the headings order_id,zip,units and two data rows. In a plain text editor, record the spelling of both order IDs and both ZIP Codes.
Use the spreadsheet's text/CSV import workflow. In Excel's transform preview, set order_id and zip to Text, keep units numeric, and check whether a prior automatic type step needs to be replaced.
Load the records and search for each complete ID. Check that the displayed ZIP and the underlying value both match your raw sample.
Write a new export. Read it as text first, then use a test import in the receiving application. Inspect the saved record before processing the full file.
Free practice example
Try the records 00012,02108,4 and 12,94103,7 under the sample headings. A successful round trip preserves two different IDs and the first ZIP's initial zero. A lookup for order 00012 returns four units, even though a numeric comparison might treat both orders as number twelve.
How to check your result
Count data rows, compare field lengths, and inspect the full strings. A file can preserve the row count and still swap units between orders when two distinct keys collapse into one.
Questions you can work through
What should I inspect before blaming Excel for a missing zero?
Open the received file in a text editor and locate the precise record. If the sender already exported 2108, ask for the original ZIP field or a corrected export.
Will wrapping the value in double quotes force every importer to keep it as text?
Quotes delimit fields in CSV. Different readers still infer types. Explicitly set the destination column to text and verify the result in that reader.
Why is converting the column to Text after import too late?
The reader may already have converted 00012 into numeric 12. A new text value of “12” has no record of how many zeros went missing.
How can I test whether two order IDs collapse in a join?
Include deliberately distinct keys such as 00012 and 12 on both sides of a small test join. Each should match just its own row with its expected quantity.
Should I add an apostrophe to every ID before handing off the CSV?
An apostrophe may become a literal character in another application's key. Prefer an agreed text field and confirm a clean round trip with the receiving team.
What about ZIP+4 values in the same column?
Use text for the whole column and keep the hyphen where the receiving specification requires it. Check a five-digit example and a full ZIP+4 example separately.
How should I handle a 17-digit shipment reference?
Import it as text from the original file. Excel's numeric precision can lose digits on long numbers. Compare the suffix as well as the prefix.
Can I safely pad all short records with zeros?
Only if the identifier's authoritative specification fixes its width. Order IDs and postal codes may follow different rules even in the same export.
How do I know whether the destination strips zeros on save?
Reopen the saved test record or export it back out and inspect the stored ID. The import preview alone may not represent what the destination persists.
How can I share the bug with support without sending customer records?
Send a small invented file with the same delimiter and field types, the import steps, the expected value, and the actual value. Keep original customer data out of the sample.
Frequently asked questions
Can I do the first check on a Mac?
Yes. Any plain text editor that shows the raw file contents lets you inspect the characters before import.
Does sorting prove an ID survived?
No. Compare the complete identifier with the original and check that the correct row still joins to it.
What should go in our handoff instructions?
Identify the text fields, delimiter, two regression records and expected results. Note the receiving application and the import path used.
Sources
Checked
Continue with the masterprompt
Original product files are in German. EUR 17.50 one-time.
✪ AISECRETS™ SPREADSHEET INTELLIGENCE™ (German product page)
Related guides
- How do I audit an AI search journey before rewriting my website?
- How do I write a forum reply that actually helps?
- How do I find the questions people ask before hiring a service?
- How do I edit a bylined article without losing the author's voice?
- How can I tell whether a student got a hinge question right for the right reason?
- How do I write an oral history when two relatives remember different dates?
- How do I correct a published statistic when the denominator was wrong?
- How do I keep a mystery scene fair about what the viewpoint character knows?
- How can I test a training video storyboard before booking a shoot?
- How do I trace a reversed decision across two sets of meeting minutes?
- How can I cut a speech to fit a hard stop and still land the ending?
- How do I catch wrong values in schema-valid AI extraction output?
- How do I correct a published LinkedIn post readers may have acted on?
- How do I fix a Google snippet that still shows my old pickup policy?
- Why doesn't the average of our two team percentages match the overall success rate?
- What should the alt text say when a product photo also acts as a link?
- How do I answer a behavioral interview question about a team win without overstating my role?
- How do I find open sales deals with no confirmed next step?
- How can I tell whether an original study actually supports my claim?
- How do I audit affiliate links that send readers to the wrong product or market?