Product codes lose leading zeros before ERP import: is cell formatting enough?
Technology 01/11/2026

Product codes lose leading zeros before ERP import: is cell formatting enough?

Read this article in ไทย 中文

A numeric-looking code is not necessarily a number

Suppose a source product code is 00127 but opening and saving the file turns it into 127. If 127 exists in the ERP, import may succeed while linking the wrong product. The remedy is not merely making zeros visible again: preserve the original identifier through the entire path and confirm how zeros function in the business code scheme.

Treat product codes, customer IDs and reference identifiers as text when they identify records. Quantities and amounts still need suitable numeric types for calculations. Do not turn the whole file into text without distinguishing roles. Have a data owner confirm length rules, permitted characters and the difference between blank and zero.

Display formatting is not value preservation

Microsoft documents that Excel can remove leading zeros and supports at most 15 significant digits of numeric precision. Store long identifiers as text before conversion. A long-number format or scientific notation does not establish completeness, and changing a damaged value to Text does not restore the original digits.

An approved fixed-length rule may permit a controlled zero-padding conversion, but a few sample rows are not proof. If 00127 and 127 represent different records, padding everything to five characters creates a collision. Compare with an untouched source file or authoritative code register before repairing values.

Set types before loading and inspect earlier steps

In Excel versions supporting Power Query, start with Data and From Text/CSV, then edit transformations. Set identifier columns to Text and inspect Applied Steps for any earlier numeric conversion. Correct the destructive step and reload the raw source. Menu wording varies by version; each ERP importer also needs its own configuration review.

Preserve a read-only raw copy before testing. Inspect exported CSV with a text viewer that does not automatically reinterpret values. Reopening it by double-clicking into Excel alone may show another conversion rather than the file’s actual content. Fixing Excel is insufficient if the destination still interprets the column numerically.

Verify linked identifiers, not only row counts

Test leading-zero codes, long codes, alphanumeric codes, blanks and pairs differing only in zeros. Compare against the reference register after transformation, export and import. Check product identity, name and linked records. Matching row counts and amount totals do not prove correct matching.

If a mismatch appears, pause the affected import batch and preserve files and results. Check whether records have already fed sales or accounting before correcting or rerunning them. For discussions with Chawinnix, provide sanitized samples, identifier rules and expected values so ERP integration acceptance can verify actual data.

Blue data cards pass through an inspection frame into matching slots

Sources