A customer ID is 000582 in your export. You double-click the CSV file, open Excel, and suddenly the ID becomes 582. It looks harmless until a product listing fails to match, an inventory import rejects the row, or a long order number changes into scientific notation. The fix is to control how Excel interprets columns before data is converted.
Do not double-click the CSV file if it contains IDs, ZIP codes, SKUs or numbers longer than 15 digits. In Excel, go to Data → From Text/CSV → Transform Data, remove unwanted automatic type-conversion steps if present, and set identifier columns to Text before loading. A proper text import preserves 000582 as text rather than treating it as the number 582. For a guided workflow, open CSV to Excel & Data Cleaner Pro.
Why Excel removes leading zeros from CSV
CSV (comma-separated values) is primarily a plain-text exchange format. By itself, it does not store Excel cell types, formulas, style rules or a declaration that a field is a product code instead of a number. When Excel opens a CSV, it can infer a type for each column. If 000582 is interpreted as a number, the mathematically insignificant zeros disappear.
This matters because not every string made of digits is a quantity. A ZIP code, ISBN-like code, employee number, phone number, payment reference or parcel tracking ID may be an identifier. You are not meant to sum or average it. It must remain exactly as supplied. Excel may also convert text such as 1-2 to a date, or show a 16-plus-digit identifier in scientific notation. These can cause silent errors in e-commerce, bookkeeping, CRM exports and fulfillment.
Step-by-step: import CSV into Excel without losing zeros
- Keep the original CSV untouched. Create a copy before opening. Verify several raw values with a plain-text editor so you know what the file actually contains.
- Open a blank Excel workbook, not the CSV itself. In the Data tab, choose From Text/CSV (the menu wording may differ by version).
- Select the source CSV. Inspect the preview and choose the correct delimiter. Commas, semicolons and tabs should produce different column layouts; if all text appears in one column, fix the delimiter before proceeding.
- Choose Transform Data. In Power Query, check the Applied Steps list. If an automatic Changed Type step converted an ID column to a number, remove or adjust that step before expecting lost zeros to reappear.
- Set identifier columns to Text. Select SKU, ZIP, phone, serial, order ID and other non-arithmetic columns, change their data type to Text and ensure no later step reconverts them to Number. Keep actual measures—prices, counts, quantities—as appropriate numeric types.
- Load the table and test. Use Close & Load and compare at least five original identifiers with the imported cells. Include a value beginning with zero, a 16-plus-digit ID, a date-like code and one containing non-ASCII characters.
- Save as XLSX for repeat use. Excel workbooks preserve cell types more reliably than saving back to CSV and double-clicking the CSV later. If you must re-export CSV, open the exported raw text to check identifiers again.
Microsoft documents this exact issue in its leading zeros and large numbers guide and CSV import instructions.
Another route: Excel’s automatic data conversion settings
On supported Excel editions, the Automatic Data Conversions settings can disable unwanted conversion of numerical text containing leading zeros, very long numbers and date-like strings. This is useful if you handle CSV files regularly. However, support and wording vary by Excel version and deployment. For the most predictable result, import explicitly and assign text types to the relevant columns. See Microsoft’s import and analysis options.
Import CSV with Solvory’s data-cleaning studio
The CSV to Excel & Data Cleaner Pro is designed for CSV/TSV-to-XLSX conversion, delimiter and supported encoding detection, blank-row/duplicate removal and protection of identifier strings with leading zeros. A sensible workflow is: inspect the file, choose delimiter and encoding, review which columns are identifiers, convert to XLSX and compare a sample before using the result in production.
Do not clean blindly: a duplicate row might be legitimate (for example, repeated units on an invoice), so use deduplication only when you know the business rule. For the reverse direction, the Excel to CSV Batch Converter provides worksheet selection, encoding and delimiter choices; inspect the exported text before sending it to another system.
Why 16-digit and longer numbers are especially risky
Excel’s numeric precision has a 15-significant-digit limit for numbers. If a 17-digit account-like identifier is converted into a number, later digits may be replaced by zeros, not just displayed in scientific notation. This is data alteration, not simply a cosmetic format. Import long IDs as text from the start and never perform arithmetic on them.
| Source value | Dangerous interpretation | Correct handling |
|---|---|---|
001254 SKU | 1254 | Text: 001254 |
02115 ZIP | 2115 | Text: 02115 |
12345678901234567 ID | Rounded numeric digits | Text: all 17 characters |
03-04 product code | Interpreted as date | Text: 03-04 |
24.50 price | Numeric 24.5 | Number, if that field is genuinely a price |
Can you restore zeros after Excel has already removed them?
If the original CSV is intact, re-import it correctly. That is the safest recovery. If the only remaining file is an already converted XLSX, formatting may create a display such as 000582 by padding a known six-character code, but it does not prove what the original value was. Many different original strings could map to the same number. For long IDs whose trailing digits were rounded, formatting cannot reconstruct the missing information: return to the source system or backup.
The formula =TEXT(A2,"000000") pads a known six-digit identifier format for display or export, but do not use it as a substitute for recovering unknown original data. The number of zeros must match the correct business specification, and very long numeric IDs may already have been irreversibly rounded.
CSV import checklist for businesses
- Define identifier columns as Text before importing.
- Check UTF-8/other supported encoding so accented names and symbols remain readable.
- Confirm delimiter, quoted commas and line breaks inside fields.
- Compare source and output row count before optional deduplication.
- Sample the first, middle and last records—not only the preview’s first few lines.
- Test an export-to-import round trip in your target application before bulk uploading.
Frequently asked questions
Why does Excel remove the zero from a ZIP code?
When Excel interprets a code as a number, zeros at the beginning are dropped. Import the ZIP column as Text instead.
Does changing a cell to Text restore numbers already rounded?
No. Changing the format does not recover information previously removed by numeric conversion. Re-import from the original source.
Will a CSV remember that a column is Text?
Generally no. A basic CSV carries field text and delimiters, not Excel’s column types. The receiving application must interpret it correctly.
Can I stop Excel from converting date-like IDs?
Use an explicit import with the column set to Text. Supported Excel versions also expose automatic conversion preferences.
Is XLSX better than CSV for product identifiers?
If you need to preserve assigned Excel text types across repeated opens, XLSX is usually the safer working format. CSV remains useful for simple interchange with systems that define their own import schema.
Open CSV to Excel & Data Cleaner Pro and inspect leading-zero identifiers before saving XLSX. For outbound data delivery, use the Excel to CSV Batch Converter with a documented delimiter/encoding choice.
Source references: Microsoft — Keeping leading zeros and large numbers; Microsoft — CSV import and export; Microsoft — Data import options. Updated October 2026. This guide uses illustrative data, not customer records or an independently audited benchmark.