Keep SKU and catalog codes when converting CSV to Excel
Preserve zero-padded catalog codes and letter-number SKUs as text before a spreadsheet rewrites them.
Quick answer. Keep SKU and catalog columns as Text before Excel guesses. Zero-padded catalog codes and letter-number SKUs are identifiers; formatting a number afterward cannot restore discarded zeros.
Try a file with a known result
Original synthetic teaching data; no customer records. Download the small sample, then load it into the matching tool. Your own files remain in your browser.
Settings for this example
Load sku-codes.csv in CSV to Excel with Comma and a header. Leave sku and catalog_code on Text. Optionally set quantity to Number. Preview before downloading XLSX.
Expected results to compare
- The preview has 3 data records and 4 columns.
- SKU-00127 and catalog 00127 keep their zeros; SKU-00008 still shows three zeros after the dash-free catalog form 00008.
- Default Text XLSX keeps every field as text. Number on quantity alone reports 3 numeric cells and allows download. Number on catalog_code blocks all three rows for leading zeros. Number on sku fails the plain-decimal check.
- Warehouse keep-conflicts finds 1 group (two North rows) and removes 0 rows. Keep-first on warehouse removes SKU-00008.
This sample preserves intact codes. It cannot restore a CSV that already stores 127 without zeros.
Open the matching tool →SKU codes are identifiers, not quantities
A stock-keeping unit such as SKU-00127 or a zero-padded catalog code such as 00127 identifies a product. Spreadsheets often treat digit-only SKUs as numbers, drop leading zeros, and sometimes strip letter prefixes when a formula or paste step rewrites the cell. The teaching file below keeps both a letter-number SKU and a zero-padded numeric code next to a plain quantity so you can see which columns must stay text.
sku,catalog_code,quantity,warehouse SKU-00127,00127,12,North SKU-00904,00904,3,South SKU-00008,00008,1,North
CSV cannot store Excel column types. Opening the file in a general-format grid is enough for 00127 to become 127. Formatting the cell afterward cannot recover the discarded zeros. The reliable habit is to keep SKU and catalog columns as text before the spreadsheet guesses.
Before and after: what Excel does to the same file
Imagine opening the teaching CSV with a general-format double-click. A typical spreadsheet display looks like this:
sku catalog_code quantity warehouse SKU-00127 127 12 North SKU-00904 904 3 South SKU-00008 8 1 North
The letter-number SKU may survive if Excel treats it as text, but the catalog codes lose their padding. Inventory systems that look up 00127 will not match 127. A text-preserving workbook from CSV to Excel keeps both columns character for character:
sku catalog_code quantity warehouse SKU-00127 00127 12 North SKU-00904 00904 3 South SKU-00008 00008 1 North
Download the same teaching bytes from /samples/sku-codes.csv and compare both paths yourself.
Convert the original export without guessing types
- Keep the vendor or storefront CSV untouched. Do not open it in Excel and Save As before the handoff.
- Open CSV to Excel, load the sample or your export, choose Comma, and keep the header on.
- Preview. Confirm
SKU-00127and00127match the source character for character, including both leading zeros on the catalog code. - Leave sku and catalog_code on Text. Optionally choose Number only for quantity. Download the XLSX and compare a few rows with the CSV.
Step-by-step troubleshooting
- Preview shows 127 already. The CSV itself lost the zeros earlier. Local conversion cannot invent padding. Re-export from the ERP or storefront; see Repair versus re-export.
- SKU looks fine but barcode shortened. Long digit barcodes belong with scientific notation and long IDs as text. Keep those columns on Text too.
- Whole file is one column. Fix the delimiter first with CSV check & repair and the one-column guide before arguing about cell types.
- Duplicate SKUs across warehouses. Cleaning with SKU alone can drop a legitimate second location. Use CSV clean with an explicit key after identifiers still match — see duplicate keys.
Checks that catch a misleading workbook
First, inspect the stored value, not only a padded display format. A custom number format can show zeros without restoring them. Second, compare letter prefixes: if SKU- disappeared or the code shifted into a formula-like cell, the handoff already rewrote the field. Third, keep warehouse and other short codes as text when they look like dates or octal numbers.
TableMender defaults every XLSX column to Text. Explicit Number choices are for true quantities. It cannot invent zeros that an earlier Save As already removed.
Honest limits
This tool does not contact Shopify, Amazon or your ERP. It does not validate barcode check digits, pad truncated codes or merge inventory quantities. Mixed SKUs in one column still need Text for the whole column if any row must keep padding. A barcode longer than fifteen significant digits is unsafe as an Excel number even when it has no leading zero. Size failures at 5 MiB or 20,000 records are capacity limits, not proof that SKUs are safe as numbers.
Edge cases for catalog systems
If your only file already shows 127, re-export rather than guessing a pad width. Marketplace exports often mix SKU, barcode and inventory counts in one sheet — continue with the Shopify-style CSV export guide. Excel Save As after a General-format open is a common way zeros disappear permanently; read Save As pitfalls before overwriting the admin download.
Worked cells in CSV to Excel
Load sku-codes.csv or the “SKU and catalog codes” sample pack entry. Preview with Comma and a header. You should see three data rows. catalog_code must still be 00127, 00904 and 00008. sku keeps the SKU- prefix because it is not a plain number; that is not proof that the catalog column is safe. Leave sku and catalog_code on Text. Number is reasonable only for quantity.
After Preview, preflight should flag leading zeros on catalog_code. Switching that column to Number blocks the XLSX download and names the source records. That is the converter refusing to store 00127 as the integer 127. CSV export still writes the characters; the next spreadsheet can still rewrite them, so a text workbook is the safer handoff.
Barcodes, mixed alphabets and warehouse keys
A 12- or 13-digit barcode is a long identifier, not a quantity. Fifteen significant digits is Excel’s numeric ceiling; a GTIN-14 or an internal 16-digit token belongs with long IDs as text. Letter case in SKU-00127 versus sku-00127 is a different string in TableMender. Ignore-case duplicate comparison changes matching, not the exported spelling — see duplicate keys.
Warehouse codes such as 01 or SEPT fail the same way as postal zeros and date-looking labels. Keep them on Text. Deduplicating on sku alone drops a second warehouse’s stock; include warehouse or variant in the key after identifiers still match.
FAQ grounded in the converter
Can TableMender pad 127 back to 00127? No. Padding width is a business rule. Re-export from the catalog.
Does a custom Excel format that shows 00127 fix the file? No. Display zeros without restoring the stored value still fail a lookup for 00127.
Are letter-number SKUs automatically safe? Often they survive a general-format open, but a later paste or formula can still strip the prefix. Keep the column on Text rather than relying on luck.
Number export on sku-codes.csv
Load sku-codes.csv in CSV to Excel with Comma and a header. The preview has 3 data records and 4 columns. The header is source record 1. SKU-00127 is source record 2. Set one column to Number, read the list, then set it back to Text.
| Column | Result |
|---|---|
| sku | Source records 2, 3 and 4: use a plain decimal, otherwise choose Text. SKU-00127 contains letters and a hyphen. 0 numeric cells. Download stays blocked. |
| catalog_code | Source records 2, 3 and 4: Leading zeros would be lost. 00127, 00904 and 00008. 0 numeric cells. |
| quantity | Accepted. 3 numeric cells (12, 3 and 1), 0 blank. Download is allowed. Two-decimal display is also accepted and does not rewrite those stored values. Identifier columns stay Text either way. |
| warehouse | Source records 2, 3 and 4: use a plain decimal. North and South are labels, not quantities. |
Letter-number SKUs fail the plain-decimal check. Zero-padded catalog codes fail the leading-zero check. Both columns stay Text. A custom format that prints 00127 on the integer 127 still stores 127.
What preflight counts on sku-codes.csv
After Preview, the identifier row warns: leading zeros in column 2 (3 cells). The how-to link on that row opens Keep leading zeros. There is no exponent, no 16+ digit token, no ZIP+4 shape and no plus-prefixed phone, so this SKU page is not the identifier link. The warning text still names the catalog zeros. Read both guides: the general padding rule is on that page; the catalog-and-warehouse habit is here.
The formula-like row stays clear. There is no fully blank data record and no exact whole-row duplicate. Empty-record removal removes 0 rows. SKU and catalog_code each identify one row in this file, so a named key on either column finds no duplicate group.
Warehouse is not a product key
Open the same file in CSV clean with Comma, a header and duplicate removal on. Two rows share warehouse North and nothing else: SKU-00127 quantity 12 and SKU-00008 quantity 1.
| Key column | Keep conflicts (default) | Keep first |
|---|---|---|
| sku or catalog_code | 0 groups. Each code is unique. 3 data records stay. | Same result. |
| warehouse | 1 conflicting group. Differing columns are 1, 2 and 3 (SKU, catalog, quantity). 0 rows removed. 3 data records stay. | Removes 1 row: source record 4, SKU-00008. Quantity 1 is gone. SKU-00127 North remains. |
| sku and warehouse | 0 groups. 3 data records stay. | Same result. That composite is unique here; a live catalog that repeats a SKU across bins still needs the location in the key. |
Keep-first on warehouse drops a different product that happens to sit in the same building. Use keep-conflicts, read the review, and pick a key that matches how a record is unique in the catalog. See duplicate keys and the storefront-shaped export when SKU repeats across inventory rows.
Related identifier problems
SKU padding is the same injury as postal zeros and phone numbers. Read Keep leading zeros for the general rule, ZIP+4 postal codes when the field is geographic, and phone numbers in CSV when country codes and extensions must stay literal. Matching tools: CSV to Excel, CSV check & repair, CSV clean.
Sources:
Examples are original teaching data. Tool-specific behavior describes this version of TableMender; software interfaces can vary by version.