You export a customer list as CSV, double-click it, and something is off. The ZIP code 02139 now reads 2139. A 16-digit account number shows as 1.23457E+15. A product code like 3-12 has become a date. Or, on a machine set to a European locale, every row sits crammed into column A. Worst of all, if you save the file again, those changes are written back to the CSV.
None of this is a bug in the data. It happens because a CSV file carries no information about types, and Excel has to guess. This guide explains what Excel guesses and why, and shows three reliable ways to get a CSV into a proper workbook with the values intact.
A CSV is only text
A CSV (comma-separated values) file is plain text: one line per row, with a delimiter between fields and double quotes around any field that contains the delimiter, a quote or a line break. That is all. There is no record of which column is a number, which is a date, which character encoding was used, or even which delimiter was chosen.
An .xlsx workbook, in contrast, stores each cell with an explicit type (number, text, boolean, date serial), plus formatting, column widths, filters and multiple sheets. Converting CSV to XLSX means making the type decisions once, deliberately, and then saving them in a format that remembers them.
What Excel guesses when you double-click
When Excel opens a CSV directly, it applies its general-purpose conversion to every field:
| In the CSV | What Excel may show | Why |
|---|---|---|
00123 |
123 |
Looks like a number, so leading zeros are dropped |
4111111111111111 |
4.11111E+15 |
Excel keeps 15 significant digits; the rest become zeros |
3-12 or MAR1 |
12-Mar or 1-Mar |
Looks like a date in the current locale |
1,5 |
15 or text |
Decimal comma versus thousands separator depends on locale |
name;email;plan |
Everything in column A | The list separator in regional settings is a comma, not a semicolon |
Café |
Café |
UTF-8 text read with a legacy encoding |
The 15-digit limit is the most damaging one: once a long number has been stored as a number, the lost digits cannot be recovered from the workbook. Always keep the original CSV until you have checked the result.
Convert CSV to XLSX in your browser
The CSV to Excel Converter makes these decisions carefully and writes a typed .xlsx, without uploading anything.
- Open the CSV to Excel Converter. Paste CSV into the Paste CSV box, or drop one or more files into the area labelled ...or add CSV files (each becomes a sheet). Load sample shows a file with leading zeros, quoted commas and escaped quotes.
- Leave Delimiter on Auto-detect, or choose comma, semicolon, tab or pipe if the file is ambiguous.
- Keep Numbers & booleans as values on so prices and quantities become real numbers that Excel can add up. Switch it off if you want every cell stored as text.
- Keep Filter buttons on header row on if you want Excel's filter drop-downs ready on the first row.
- Check the preview. If you added several files, switch between them with the sheet tabs. Pasted data uses the name in Sheet name for pasted data.
- Click Download .xlsx.
Codes with leading zeros, such as 00123 or 02139, are always kept as text, and so are integers too large to be stored exactly (above 9,007,199,254,740,991). Column widths are set from the content. One caution: a 16-digit identifier below that limit is still converted to a number, and Excel will display and keep only 15 significant digits of it. For files with card, account or tracking numbers, switch Numbers & booleans as values off so every cell stays text.
Because each file becomes its own sheet, this is also a quick way to bundle a set of monthly exports into one workbook. If you would rather stack them into one long table, use the CSV Merger first.
Importing correctly inside Excel
If you prefer to stay in Excel, do not double-click the file. Import it instead.
Data > From Text/CSV (Power Query)
In current versions of Excel for Windows, go to Data > From Text/CSV, choose the file, and check File Origin (pick UTF-8 for most modern exports) and Delimiter in the preview. Then click Transform Data rather than Load, select the columns that hold codes or long IDs, and set their type to Text. Power Query otherwise detects types from the first rows, which can still strip leading zeros.
The legacy Text Import Wizard
The older wizard lets you mark individual columns as Text in its final step. In recent versions it may need to be enabled under File > Options > Data as a legacy data import option. It is slower for wide files but gives column-by-column control.
Excel for Mac and other spreadsheets
Excel for Mac has a similar import flow under the File or Data menu, depending on the version. LibreOffice Calc shows an import dialog every time you open a CSV, where you can pick the character set, separator and column types. Google Sheets (File > Import) lets you choose the separator and whether to convert text to numbers and dates.
Python with pandas
For repeatable conversions, read the code columns as strings explicitly:
import pandas as pd
df = pd.read_csv("customers.csv", dtype={"zip_code": str, "account_no": str})
df.to_excel("customers.xlsx", index=False, sheet_name="Customers") # needs openpyxl
Without the dtype mapping, pandas makes the same kind of guess that Excel does.
Troubleshooting
Everything is still in one column
The delimiter was not recognised. Semicolon-separated files are common in countries that use a comma as the decimal mark. Choose the delimiter manually, or check the file in a text editor to see what separates the fields.
Strange characters instead of accents
The file was read with the wrong encoding. Save or export it as UTF-8, or pick UTF-8 as the file origin when importing. If you are producing CSVs for Excel users, the Excel to CSV Converter can add a UTF-8 byte order mark that helps Excel detect the encoding.
Row counts do not match
A field containing a line break inside quotes is one row, even though it spans several lines in a text editor. Tools that split on line breaks naively will disagree with a proper CSV parser. To inspect a file without converting it, open it in the CSV & Excel Viewer.
Dates stay as text
Dates in a CSV are strings, and formats like 03/04/2025 are ambiguous between day-first and month-first. Keep them as text during conversion, then convert with a formula or Text to Columns once you know which convention the source used.
Frequently asked questions
How do I stop Excel removing leading zeros from a CSV?
Don't open the CSV by double-clicking. Import it with the column set to Text, or convert it to .xlsx with a tool that keeps zero-prefixed codes as text.
Why does Excel show long numbers as 1.23E+15?
Excel stores numbers with 15 significant digits of precision, so longer IDs are rounded and shown in scientific notation. Store such IDs as text.
Can I combine several CSV files into one workbook?
Yes. Add multiple files to the CSV to Excel Converter and each file becomes a separate sheet in the same .xlsx.
Is XLSX bigger than CSV?
Not necessarily. XLSX is a compressed ZIP package, so a large, repetitive table is often smaller as XLSX than as plain CSV, even with formatting added.
Will my data be uploaded?
No. The conversion runs in your browser, and the workbook is created on your device.