CSV guide

Keep Leading Zeros When Opening CSV Files in Excel

A CSV stores values as text but does not store Excel cell types. When Excel guesses that 00123 is a number, it can display 123 instead; long identifiers can also be shown in scientific notation or lose precision. Previewing the source text and creating an XLSX with identifier-like values kept as text protects the original characters.

Convert CSV to Excel

Step by step

  1. Open the original CSV and locate columns containing ZIP codes, SKUs, account numbers, phone numbers or long IDs.
  2. Confirm in the preview that values such as 00123 and long digit strings still contain every original character.
  3. Convert the CSV to XLSX; CSV Dock writes imported CSV values as text by default.
  4. Open the XLSX and verify the sensitive columns before editing, sorting or resaving the workbook.

Check the result

  • Compare several values with the raw CSV, including the longest identifier and one beginning with zero.
  • Confirm that Excel does not display the identifiers in scientific notation and that the exact digit count is unchanged.
  • If another system needs CSV rather than XLSX, test its import settings with a copy before replacing production data.

Common pitfalls

  • Formatting a cell after Excel has already removed digits or leading zeros does not reconstruct the original value.
  • CSV has no portable column-type metadata, so a different importer may guess types again.
  • Identifiers may look numeric but should not be treated as quantities when arithmetic is not meaningful.

Download the example

The public sample contains synthetic data only. Download the test input and open it in the linked tool.

Expected outcomes and file checksums are published in the versioned CSV edge-case dataset.

Privacy boundary

Files selected in the workbench are processed locally. A public URL is requested directly by the browser and must permit cross-origin access. No server proxy is used by the MVP.