Quick answer
If a CSV field such as 001234 becomes 1234 after import, Google Sheets may have interpreted the identifier as a number. For postal codes, SKUs and account IDs, store the field as text. If the original zeros were removed during import, merely formatting the resulting number cannot prove what the original identifier was.
First: Decide whether zeros are part of the data
00042 and 42 are the same numerical quantity but may be different IDs. If the value participates in arithmetic, a number can be appropriate. If it identifies a record, text usually preserves its intended spelling.
Prevention before importing
Where your import workflow allows it, set the destination identifier column’s number format to Plain text before placing or pasting values. Also inspect the CSV import settings for numeric/text conversion behavior; available options can vary by interface and import route. Check a small sample of the imported rows immediately.
For critical datasets, preserve the original CSV as a separate source-of-truth file before changing it. Never overwrite the only original during cleanup.
If the field is already a number
If every identifier is known to require a fixed width of 6 digits, a display or text-generation approach can help:
=TEXT(A2,"000000")
For numeric 42, this returns a six-character text representation 000042. But this is a reconstruction based on your six-digit rule, not recovery of arbitrary lost original zeros.
Do not apply a fixed-width formula when different identifiers legitimately have different lengths.
Numeric display versus actual identifier
Applying a custom number format with zeros can make a cell look padded without changing its underlying number. That distinction matters for CSV export, lookups, concatenation and data exchange. For reliable identity matching, verify the stored text type and output—not just on-screen appearance.
Check downstream lookups
If other files use text IDs with leading zeros, a numericized import may cause failed exact matches. Normalize values consistently in an explicit helper column; do not coerce all keys to numbers simply to make one lookup work.
Checklist for a safe import
- Keep an untouched original CSV.
- Identify which columns contain codes rather than quantities.
- Preserve those columns as text from the start.
- Compare a sample of imported IDs to their original CSV strings.
- If padding is required, document the exact width rule.
Sources
Editorial note: Examples are illustrative and based on the linked documentation; no firsthand product test is claimed.