Shopify import fix

SKU lost its leading zeros after saving as CSV

Excel decides that 00127 is the number 127. The zeros are not hidden, they are removed before the file is written. Nothing in the CSV can restore them.

How to fix it

  1. Open the source file and select the SKU column.
  2. Format the column as Text before entering or importing any data.
  3. If the data is already damaged, re-export from the source system with SKUs as strings.
  4. Verify by opening the CSV in a text editor: 00127 must appear with its zeros.

How to avoid it next time

Treat every identifier column (SKU, barcode, variant ID) as text from the start. Excel will silently change any column of digits it thinks is numeric.

Check the whole file before you import again

The free Shopify CSV checker names the exact line for each of these problems. The paid Rescue Kit adds 20 more error cases, a template in Shopify's column order, and the checker as a script you can run in a pipeline.

See the Rescue Kit →

This is not a display problem. When Excel loads a column of digits it decides the type is numeric, converts 00127 to the number 127, and writes 127 into the CSV. The zeros are not hidden or formatted away — they were removed from memory before the file was written.

Why no converter can fix it after the fact. The information is gone. A tool that "restores" leading zeros has to guess the original width, and guessing wrong is worse than doing nothing: you get 000127 where the warehouse expects 00127, and nothing matches.

Where it bites. SKUs, barcodes, variant IDs, postal codes, phone numbers and account numbers. Anything that is an identifier rather than a quantity.

The three fixes, in order of reliability. Format the column as Text before entering data. Or prefix every value with an apostrophe, which Excel strips on display and keeps on save. Or export from a system where every column is a string by default.

How to verify. Open the saved CSV in a plain text editor, not Excel. If 00127 appears with both zeros, the file is intact. If it reads 127, it is already damaged.

Questions

Can I set a custom number format like 00000?

That changes display only. Saving to CSV writes the underlying value, so the zeros are lost again.

Does Google Sheets have the same behaviour?

Yes, it infers numeric types the same way. Text format is the only reliable fix there too.

What if the SKU is already numeric in my database?

Then it has no leading zeros by definition. Store identifiers as strings at the source.