Data Import & Export

Prevent Excel from Converting CSV Text Columns

Ayan MasoodAyan Masood Nov 18, 2026 869 views

Question details

Import and save CSV values without losing leading zeros or other text-like data needed by another system.

Prevent Excel from Converting CSV Text Columns
Product
Microsoft Excel
Device & OS
not provided
Scenario
A CSV file contains columns that must be treated as text when uploaded to another system.
Observed behavior
Opening the CSV directly in Excel causes automatic type conversion, which can remove leading zeros and trigger import errors.
Before you start

Identify the columns that must be read as text, such as account numbers or IDs. If Excel has already removed leading zeros and the CSV was saved, use the original CSV if available; changing the column to Text afterward will not restore the lost zeros.

Solution 1Recommended

Import the CSV as text with Power Query

Use Excel's CSV import tools to control column types before loading the data into a worksheet.

CSV files store values, not Excel formatting or column types. The receiving system must also be configured to interpret the relevant fields as text.

1
Start a CSV import

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

2
Avoid automatic type detection

In the import preview, set Data Type Detection to Do not detect data types if that option is available, then select Transform Data.

3
Set columns to Text

In Power Query, inspect Applied Steps and remove any automatic Changed Type step that converted the values. Select each affected column, then choose Data Type > Text.

4
Load and check the values

Select Home > Close & Load, then check the imported columns in the worksheet to confirm that leading zeros and other text values are intact.

5
Save and configure the upload

Use File > Save As and choose CSV. In the receiving system's import settings, assign the affected fields a text or string type before uploading.

Import the CSV as text with Power Query
Check the saved values: If you need to verify the CSV, inspect it in a text editor rather than double-clicking it in Excel, which may apply automatic conversion again.
Work with CSV files in WPS

Import CSV Columns as Text in WPS Spreadsheets

Use the text import options in WPS Spreadsheets to preserve values such as leading-zero IDs, then save the data as CSV for upload.

  1. 1. Start the import: Open WPS Spreadsheets and select Data > Import Data, or the text import option available in your version. Choose the original CSV file.
  2. 2. Set the delimiter: In the import wizard, select the delimiter used by the file, usually Comma, and review the column preview.
  3. 3. Choose text columns: Select each column that must retain leading zeros and set its column data format to Text. Finish the import and check the values in the worksheet.
  4. 4. Save the CSV: Select File > Save As and choose CSV. Configure the receiving system to import the affected fields as text.
Import identifier columns as text to preserve leading zerosOpen and edit Microsoft Excel XLSX and XLS filesSave spreadsheet data as CSV for other systemsUse a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel remove leading zeros when I open a CSV?

Excel may interpret fields containing only digits as numbers when you open a CSV directly. Use Data > From Text/CSV and set those columns to Text before loading.

Can a CSV file store Excel's Text formatting?

No. A CSV stores values, not Excel formatting or column types. Set the relevant fields to text in the receiving system's import settings.

Will changing a column to Text restore missing leading zeros?

No. If the values were already converted, changing the format does not recreate lost zeros. Import the original CSV again and set the column to Text before loading it.

How can I check the saved CSV without Excel converting it again?

Open the saved CSV in a text editor and inspect the affected fields. Avoid double-clicking the file if that opens it directly in Excel.