Import CSV in Excel Without Losing Leading Zeros
CSV stores field text, not Excel cell formats. Double-clicking a CSV can let Excel interpret 00073 as 73 before you have a chance to choose a type.
Download the sample CSV (.csv) Download expected Excel result (.xlsx)
The failure is visible in three rows
| Raw CSV ID | Date field | Expected after text import |
|---|---|---|
00073 | 03/04/2026 | ID stays 00073; date stays text until its order is declared |
00120 | 2026-04-05 | ID stays 00120 |
00000 | empty | ID stays 00000; date remains empty |
Open the CSV in a text editor if you need to prove what the source contained. The expected workbook has these strings in A4:A6 and deliberately leaves dates as strings in B4:B6. It is a reference result, not an automatic import connection.
Import with type control
- In a new desktop workbook, choose Data → From Text/CSV and select the downloaded file. Check the comma delimiter and preview.
- Select Transform Data. Set the
IDcolumn to Text before loading. If Power Query added an automatic Changed Type step that already converted IDs to numbers, remove or replace that step while the original file is still available. - Set
Dateto Text too when its order is not agreed. Use a declared locale or an explicit conversion after import. Load, then compare the three IDs and dates with the reference workbook.
Changing a numeric cell's display to a five-digit format after an incorrect import makes it look padded; it does not restore the original identifier text. A CSV saved from Excel can lose formulas, formatting and extra sheets.
Compatibility
Microsoft documents Text/CSV import and Power Query type selection for current desktop Excel. Controls differ by Windows/Mac release and Excel for web; use a supported import path with an explicit text type and inspect the preview. This sample's 03/04/2026 is intentionally ambiguous.
Sources: Microsoft Support: import text or CSV and Microsoft Support: keep leading zeros.