Blog

Fix leading zeros disappearing in a supplier catalog

Restore supplier catalog codes after leading zeros disappear, and learn how to keep IDs as text when editing or importing a CSV file.

Emily ParkerTools and utilities 4 min read

A supplier catalog code such as 000583 can turn into 583 after you open or edit a CSV file. That can make an item hard to match with purchase orders, inventory records, or the supplier’s system.

The key is to treat catalog codes as text, not numbers. You can check and edit the file with the CSV Editor, then confirm whether the original zeros are still present or need to be restored from a reliable source.

Check and correct the catalog codes

  1. Make a copy of the original CSV first. Open the copy in the CSV Editor so you can inspect the file without changing your only version.
  2. Find the column that contains supplier codes, SKUs, or product IDs. Check several affected rows and compare them with a purchase order, product master, or another trusted supplier record.
  3. Check whether the zeros are missing from the CSV itself. If the file shows 000583 in the editor but another app shows 583, that app is displaying the code as a number. If the CSV shows 583, the zeros have already been removed from that copy.
  4. Restore a code only when you can confirm its correct form. Edit the affected cells in the CSV Editor, or replace the damaged file with a fresh supplier export if there are many changes.
  5. Save the corrected file as a new CSV. Open that copy in the editor again and check representative codes from the beginning, middle, and end of the catalog.

Do not add zeros just to make codes look consistent. A short code may be valid, and padding it to the wrong length can create a different supplier ID.

What the result means

The CSV Editor shows the zeros, but another app does not

The file likely still contains the correct code. The other app is interpreting the column as numbers and hiding leading zeros in its display. Import the CSV with the code column set to text, rather than opening the file in a way that automatically guesses column types. The exact import steps depend on the app.

The CSV Editor shows codes without their zeros

The current file contains only the shortened values. A CSV is plain text and does not store a column type that says “keep this as text.” If the zeros were removed when the file was saved, restore them from a supplier source, a backup, or a reliable matching record.

Some codes have different lengths

That may be correct. Codes can be identifiers rather than quantities, and their length can vary by supplier or product group. Check the supplier’s format before changing the column, especially if you are joining this catalog to another file.

All codes follow a confirmed fixed length

If the supplier confirms that every code has, for example, eight characters, a shorter number may be restored by adding zeros to the left until it reaches that length. Use the documented rule, not a guess based on a few rows.

How to keep zeros from disappearing

  1. Keep an untouched source copy. Save the supplier’s original export separately before editing, sorting, or importing it. If a later app changes the codes, you can compare against the original.
  2. Import the code column as text. When a spreadsheet or database offers column type choices during CSV import, set supplier codes, SKUs, and postal-style identifiers to text. Avoid relying on automatic type detection.
  3. Do not assume quotation marks are enough. A value such as "000583" may still be treated as a number by some import workflows. Set the column type explicitly where the app allows it.
  4. Check a few codes after every export. Reopen the saved CSV in the CSV Editor and inspect several values. Confirm that any restored zeros remain in the actual file, not just in the spreadsheet’s display.
  5. Use a trusted source for bulk repairs. If many codes have changed, re-export the catalog or match the affected rows against an authoritative supplier list. Do not guess padding for thousands of entries.

When you cannot determine the original code

A shortened value does not reveal how many zeros were removed. For example, 583 could have been 0583, 00583, or a valid three-digit code. If the supplier does not use one confirmed code length and you have no backup or matching record, the original value cannot be recovered from that shortened number alone. Ask the supplier for a fresh catalog before importing or ordering against uncertain IDs.

The CSV Editor processes the file in your browser, and the file stays on your device.