Data Import & Export

Keep Quoted CSV Values as Text in Excel Without Losing Leading Zeros

Amos GikundaAmos Gikunda Nov 20, 2026 869 views

Question details

The user wants Excel to preserve quoted numeric CSV values as text, including their leading zeros.

Keep Quoted CSV Values as Text in Excel Without Losing Leading Zeros
Product
Microsoft Excel
Device & OS
not provided
Scenario
Opening or importing a CSV file containing quoted identifiers such as ZIP codes or part numbers.
Observed behavior
Excel separates the CSV fields but interprets quoted numeric values as numbers, changing values such as 0080081 to 80081.
Before you start

Identify the columns that must remain text, such as ZIP codes and part numbers. Use the original CSV for the import, because leading zeros already removed in Excel may not be recoverable from the converted values.

Solution 1Recommended

Import the CSV with data type detection disabled

Use Excel's CSV import tools to preserve leading zeros by treating the relevant columns as text before loading.

Quotation marks delimit CSV fields but do not tell Excel to keep their contents as text. Excel does not provide a universal preference that treats every quoted CSV field as text.

1
Start the import

In Excel, open a workbook and select Data > From Text/CSV. Choose the original CSV file and select Import.

2
Disable type detection

In the import preview, open the Data Type Detection menu and choose Do not detect data types, if available.

3
Check the text columns

Select Transform Data to open Power Query. Select the columns containing identifiers and choose Transform > Data Type > Text before loading them.

4
Load and verify

Select Home > Close & Load, then check that an example such as 0080081 still includes its leading zeros.

Import the CSV with data type detection disabled
Import options can vary: Menu names and CSV import options vary by Excel version. Set the affected columns to Text before automatic conversion; changing a converted number to text afterward will not restore its original zeros.
Free Microsoft Office alternative

Work with CSV and Excel files in WPS Spreadsheets

WPS Office is a free, lightweight alternative with a familiar spreadsheet interface. Open CSV and Excel files in WPS Spreadsheets for an easy transition, while continuing to use Microsoft Office formats.

Open and work with CSV data in a spreadsheet interfaceCompatible with Microsoft Excel XLSX and XLS formatsFamiliar menus make the transition from Microsoft Office easierFree and lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel remove leading zeros from quoted CSV values?

Excel uses quotation marks to identify CSV field boundaries, but it may still detect the contents as numbers. Import the file through Data > From Text/CSV and set the relevant columns to Text before loading.

Can I make Excel treat every quoted CSV field as text by default?

Excel does not currently provide a universal preference for this. Use the CSV import tools to control data types for each import, or submit a feature request through File > Feedback.

Will changing a column to Text restore zeros that Excel already removed?

No. Changing the format after conversion does not recover the original digits. Reimport the original CSV and set the column to Text before loading.

Can I preserve leading zeros by adding an apostrophe?

An apostrophe entered before a value in an Excel cell can make Excel treat it as text. For a CSV file, importing the affected columns as Text is generally more reliable than modifying individual values.