Data Tools Guide

Convert CSV to Excel Cleanly (Preserving Formatting, Dates, and Leading Zeros)

Affiliate disclosure: This page contains Amazon affiliate links. If you purchase through them, I may earn a small commission at no extra cost to you.

Opening a CSV in Excel directly often corrupts dates, drops leading zeros, and misinterprets special characters. The import wizard approach prevents all of these problems.

Double-clicking a CSV file to open it in Excel is one of the most common ways to corrupt data. Excel makes automatic decisions about data types during this process that it cannot reverse without re-importing from the original file. Product codes that start with zeros lose their leading zeros. Dates convert to formats that differ from the original. Special characters appear as question marks or boxes. These problems all have solutions, but they require using the import wizard rather than the default open.

Why direct CSV opening causes data problems

When you open a CSV by double-clicking, Excel reads each cell's value and automatically assigns a data type based on what the value looks like. A value like "007" looks like a number to Excel, so it converts it to 7, dropping the leading zero. A value like "1/2/2026" looks like a date, so Excel converts it to its internal date format, which may display differently depending on your regional settings.

The automatic conversion is irreversible in the open file. The original CSV still contains "007" as a text string, but the Excel file now stores it as the number 7. Saving the Excel file preserves the corrupted value, not the original.

The import wizard approach

Instead of opening a CSV by double-clicking, use the Data Import or Get External Data function in Excel. This launches an import wizard that lets you specify the data type for each column before any automatic conversion occurs.

In the import wizard, columns containing product codes, order numbers, postal codes, phone numbers, or any other data that looks like a number but should be treated as text can be explicitly set to Text data type. This prevents any automatic conversion and preserves leading zeros, special characters, and exact string values.

Date columns can be specified with the exact format used in the CSV (day/month/year versus month/day/year, for example) so Excel interprets them correctly regardless of the regional settings of the computer running the import.

Encoding and special character issues

CSV files are plain text files that can be encoded in different character encodings. The most common are UTF-8, which supports all Unicode characters including accented letters and non-Latin scripts, and Windows-1252 (often described as ANSI), which only supports Western European characters.

When Excel opens a UTF-8 CSV that was not marked with a BOM (Byte Order Mark), it may interpret the file as Windows-1252. Accented characters like e with an accent, n with a tilde, and c with a cedilla then appear as garbled symbols because their byte values are interpreted incorrectly.

The import wizard allows you to specify the file encoding before the data is loaded. Selecting UTF-8 (or Unicode UTF-8 in some Excel versions) when importing a UTF-8 CSV preserves all special characters correctly.

If you receive a CSV that was created by someone using a different system and the special characters are garbled, the first step is to identify the encoding. Opening the file in a text editor that shows encoding information (such as Notepad++ on Windows) usually reveals the encoding. Then re-import using the correct encoding setting.

Date format problems between CSV and Excel

CSV files do not have a universal date format. A date might be stored as "2026-07-04" (ISO 8601 format), "04/07/2026" (UK format), "07/04/2026" (US format), or many other variations. Excel applies the computer's regional settings to interpret ambiguous date strings, which means the same CSV file opened on a UK computer and a US computer may produce different date interpretations.

The import wizard allows you to specify which date format the CSV uses, so the interpretation is correct regardless of regional settings. For cross-regional teams sharing CSV files, storing dates in ISO 8601 format (year-month-day) eliminates ambiguity because this format is unambiguous regardless of regional conventions.

Large number handling

Very large numbers like EAN barcodes, ISBNs, and financial account numbers contain too many digits for Excel's default number precision. Excel stores numbers with a maximum of 15 significant digits. A 13-digit barcode like an EAN-13 code fits within this limit, but a 20-digit financial identifier does not. The excess digits are replaced with zeros, silently corrupting the data.

Importing these columns as Text in the import wizard preserves all digits exactly. The values cannot then be used in arithmetic calculations, but for identifiers that should never be calculated anyway, this is the correct approach.

Using the browser-based conversion tool

The CSV to Excel tool provides a clean conversion without the manual import wizard steps. Upload the CSV, and the tool produces an Excel file with all data imported as text by default, preserving leading zeros, special characters, and exact string values. For data that needs specific type handling, reviewing the output and applying Excel's cell formatting to specific columns is more predictable than relying on automatic type detection during import.

Page last updated: