How to convert CSV to Excel without changing your data
Choose the cell types before Excel chooses them for you. Updated 7 November 2026.
Free toolCSV to ExcelConvert CSV to XLSX with a cell-type preview. Keep leading zeros and long IDs, preserve decimal places and make a workbook from several files.Convert CSV to ExcelThe short answer
Import your CSV with explicit column types, then save a real XLSX workbook. Keep identifiers as text and convert only the values you intend to calculate.
You can use the CSV to Excel converter for a local preview. If Excel is already your workspace, its Data import gives you more control over repeated imports.
| Method | Best fit | Tradeoff |
|---|---|---|
| floi in your browser | A few CSVs, visible cell types and a workbook to share. | Explicit browser memory limits. No repeatable import query. |
| Excel Data import | Existing workbooks, larger imports and repeatable transformations. | You must check automatic type changes before loading. |
| Python with openpyxl | A repeatable local batch process with deliberate typing. | Needs Python, a package and a small script. |
What a CSV cannot tell Excel
A CSV does not declare cell types. 00123 could be a product code; 12.50 could be a price.
Microsoft documents automatic removal of leading zeros and conversion of long numbers. Excel numeric precision stops at 15 significant digits. Store longer identifiers as text. See Microsoft’s guidance on zeros and large numbers.
- Quoted is not typed. CSV quotes protect delimiters and line breaks. They do not guarantee a text cell in the next application.
- A price has two concerns. The stored number supports arithmetic. Its number format controls whether Excel shows
12.50or12.5. - Dates need an agreement.
03/04/2026has two plausible meanings. Keep it as text until you know the source’s date order.
Convert in your browser with a preview
Open the CSV, inspect the types and save the workbook. The converter reads files and builds XLSX on your device.
- Open your files in CSV to Excel. If the grid has one column, choose the source’s Delimiter.
- Check accents and non-Latin characters. Use Text encoding if automatic decoding looks wrong.
- Keep IDs as Text. Use Number for safe plain quantities and prices. Choose the correct Decimal mark.
- Leave dates as text, or choose Date · YYYY-MM-DD for valid ISO date columns.
- Read the review notes, then save. Each CSV becomes a sheet. Save all can create separate workbooks.
The converter keeps leading-zero codes and long identifiers as text even if you choose Number. It refuses malformed quotes or oversized cells rather than silently removing content.
A tested example: what the XLSX actually stores
We generated a workbook from a synthetic CSV on 7 November 2026. We reopened it with an independent XLSX reader and checked the saved cell types and displayed values.
| CSV value | Saved cell type | Displayed result | Decision |
|---|---|---|---|
00123 | Text | 00123 | Keep the leading zeros. |
1234567890123456789 | Text | 1234567890123456789 | Keep all 19 digits. |
12.50 | Number | 12.50 | Numeric 12.5, with a two-decimal number format. |
03/04/2026 | Text | 03/04/2026 | Do not guess the date order. |
2026-11-07 | Text by default | 2026-11-07 | Date conversion requires an explicit column choice. |
=1+1 | Text | =1+1 | A literal value, never an executable formula. |
Hello, Zoë in a quoted field | Text | Hello, Zoë | One field, including the comma and accent. |
Method: the floi CSV parser and XLSX writer, Smart values, full-stop decimals and a header row. SheetJS 0.20.3 independently read the workbook’s values, types and number formats. This tests the saved file structure; it is not a desktop Excel rendering test. The reproducible check is node --test scripts/check-csv-excel.mjs in the floi source.
Use Excel’s Data import for more control
Choose Data → From Text/CSV instead of double-clicking the CSV. Inspect types before the table reaches the worksheet.
- Open a blank workbook and choose Data → From Text/CSV. Select your source file.
- Check the file origin or encoding and the delimiter in the preview.
- Choose Transform Data when available. Inspect any automatically added Changed Type step.
- Remove or adjust that step before it converts identifiers. Assign Text to code, account and long-ID columns.
- Assign the intended numeric or date types to other columns. Check date locale where needed.
- Load the data, then use Save As and choose Excel Workbook (.xlsx).
Menu names vary by version and platform. Current Excel versions also expose automatic data conversion preferences. Microsoft explains them in Data import and analysis options.
Changing a numeric cell to Text afterwards cannot recover lost digits. Set the type before that conversion. A display mask such as 00000 can show a five-digit code, but the underlying numeric value is still different.
Convert CSV to XLSX with Python
Use a script when the same local batch returns every week. This example deliberately stores every source field as text.
python -m pip install openpyxlSave this as csv_to_xlsx.py beside your CSV files, then run python csv_to_xlsx.py:
import csv
from pathlib import Path
from openpyxl import Workbook
from openpyxl.cell import WriteOnlyCell
for source in Path(".").glob("*.csv"):
workbook = Workbook(write_only=True)
sheet = workbook.create_sheet("Data")
with source.open(encoding="utf-8-sig", newline="") as handle:
for row in csv.reader(handle, delimiter=","):
cells = []
for value in row:
cell = WriteOnlyCell(sheet, value=value)
cell.data_type = "s"
cells.append(cell)
sheet.append(cells)
workbook.save(source.with_suffix(".xlsx"))The explicit string type keeps formula-like text literal. Numbers also remain text, so convert known numeric columns deliberately if you need calculations. Change the delimiter and encoding to match the export. Existing XLSX files with the same names are replaced.
This script does not add preview, filters, cell-length checks or type review. Use a separate output folder for valuable existing workbooks. The package’s write-only worksheet documentation explains the memory tradeoff.
Fix the three common import problems
Check separators, encoding and types independently. They solve different problems.
| Symptom | Check first | What will not fix it |
|---|---|---|
| Every row is in column A. | The delimiter. European exports often use semicolons. | Renaming the file or changing number formats. |
Accents look like é. | The source encoding. Reopen the original bytes with the correct decoder. | Converting already garbled text into a new workbook. |
| Codes lose zeros or IDs change. | Assign Text before import, using the original export. | Formatting the damaged numeric result as Text afterwards. |
Know when the browser converter is too small
Use another workflow when you exceed floi’s limits or need a repeatable transformation. Browser memory is finite.
Floi supports 100,000 rows and 256 columns per sheet, with 1,000,000 cells across the workbook. Excel’s format supports 1,048,576 rows and 16,384 columns per worksheet. Both still need enough memory. See Excel’s published limits.
Saving back to CSV removes workbook features such as cell types, filters and extra sheets. Keep the XLSX when those decisions matter. Compare important exports with the source before sending them.