CSV to Excel
Published Updated
Turn a CSV into a one-sheet .xlsx workbook, split on commas, semicolons, tabs or pipes. A value becomes a number only if it reads back exactly as written, so ZIP codes such as 02134 keep their leading zero.
Which values become numbers
The rule is a round trip: text is turned into a number and back, and a value is stored as a number only if it reads back as the same number. A decimal that ends in zeros, such as 3.50, is a number and carries a number format with its decimals. Everything else stays text.
| In the CSV | In the workbook | Why |
|---|---|---|
| 32, -7, 3.5, 0.1 | Numbers | They read back unchanged |
| 02134 | Text 02134 | As a number it would lose its zero |
| 3.50 | Number 3.5 with number format 0.00 | The number format records both decimals |
| 1,234 as one cell (quoted, or in a semicolon file) | Text | The comma is not part of a number |
| 1e10, .5, -0 | Text | Notations and signs that are not plain digits are kept as typed |
| 12345678901234567890 | Text | Too many digits to survive as a number |
| 4111111111111111 | Text | Over 15 digits, which Excel would round as a number |
| 2026-10-31, TRUE | Text | No date or true/false conversion |
| =SUM(A1:A2) | Text | Never a formula |
In Excel, the SUM function ignores text cells, and numbers carry at most 15 significant digits, so a card number stays text to keep its 16th digit.
About the header checkbox
Ticked, the first row is kept as text and gets filter buttons. Unticked, the first row is plain data and nothing is removed. The preview shows the first 20 rows either way and marks the first one in bold only when the box is ticked.
How large a CSV can be
Excel's specifications and limits cap a worksheet at 1,048,576 rows by 16,384 columns and a cell at 32,767 characters. The tool checks those while parsing, plus its own memory guards:
| Limit | Value | What happens |
|---|---|---|
| Filled cells | 2,000,000 | Refused; 100,000 rows of 20 columns is exactly the ceiling |
| Rows | 1,048,576 | Refused; only a one-column file reaches it |
| Columns | 16,384 | Refused |
| Text in one cell | 32,767 characters | Cut, with a count of affected cells shown first |
| Whole file | 50,000,000 characters | Refused; files over 200,000,000 bytes are refused before reading |
Making the workbook
Step 1
Add the CSV
Choose a .csv file. It is read as UTF-8 text and parsed right away, with the first 20 rows shown in a preview.
Step 2
Match the delimiter
Comma is preselected. If the preview shows several values run together in one column, switch to semicolon, tab or pipe; the file is parsed again at once.
Step 3
Convert and download
The workbook saves as yourfile.xlsx with a single sheet called Sheet1. A ticked header box adds filter buttons to row 1. Nothing else is styled: no bold, no column widths.
How the text is read
- Quotes work as in RFC 4180: a field that starts with a double quote can hold delimiters and line breaks, and two quotes stand for one. A stray quote mid-field is kept as a character.
- Blank lines are skipped and empty fields at the end of a row are dropped.
- There is no auto-detect. A semicolon file read with comma splits 1,50 into two cells, which the preview makes obvious.
- Text is decoded as UTF-8, as Blob.text() always does, so accents in a CSV saved in an older Windows encoding turn into replacement characters.
- For data that starts as JSON, JSON to Excel writes the workbook directly.
Reading the workbook back
To check what the table above says, we ran the site's own parser and workbook writer (lib/csvToExcel.ts) in Node 22.23.1 on generated values, with the header box ticked, and then read the .xlsx with openpyxl 3.1.5, a different program from the one that wrote it. The values below are test data, not anyone's records.
| In the CSV | Cell in the workbook | Note |
|---|---|---|
| 0 | Number | A single zero round-trips. |
| 123456789012345 (15 digits) | Number | The longest run that is still stored as a number. |
| 1234567890123456 (16 digits) | Text | One digit more and it is kept as text. |
| 1.0, 47.0 | Number | Stored as 1 and 47 with the number format 0.0. |
| 5. | Text | A trailing dot is not a plain number, so it is kept as typed. |
| +5, 00, a space then 5 | Text | Same reason. |
| 0x10, Infinity, NaN, 1E5 | Text | Words and notations are not converted. |
| 10/31/2026 | Text | No date conversion. |
| =SUM(A1:A2), +1+1, @cmd, -5-5 | Text | Stored as plain text strings; openpyxl read the first one as a string, not as a formula. |
| "1,5" (quoted) | Text | The comma is part of the text. |
We checked decimals on a generated file of 10,000 rows with the site's own writer (lib/csvToExcel.ts) in Node 22.23.1, reading the workbook back with the xlsx library and openpyxl 3.1.5. A column of prices with two decimals gave 10,000 numbers and no text cells, and a column of scores with one decimal also gave 10,000 numbers. About 1,000 of the prices and 980 of the scores end in a zero; those cells carry a number format such as 0.00, so the number format records two decimals for 12.50. ZIP-style codes with a leading zero and TRUE/FALSE flags stayed text.
The header box also matters for numbers. With it ticked, a first row of 2026 and 2027 was written as text and the sheet had an autofilter over A1:B3. With it unticked, the same row became the numbers 2026 and 2027 and there was no filter.
File size and time for larger files
We generated files of 10 columns (numbers, names, codes, flags) and timed the parse and the workbook build in Node, one run each. Times in a browser depend on the device.
| Rows | CSV | .xlsx | Parse | Build |
|---|---|---|---|---|
| 1,000 | 63,649 B | 160,597 B | 3 ms | 62 ms |
| 10,000 | 644,720 B | 1,515,225 B | 14 ms | 362 ms |
| 100,000 | 6,547,791 B | 15,207,719 B | 127 ms | 4,221 ms |
The workbook was about 2.3 to 2.5 times the size of the CSV in all three runs, so expect a bigger file, not a smaller one, for data like this. The limit checks matched the table above: 100,000 rows of 20 columns were accepted and 100,001 were refused with a message naming 2,000,020 cells, one column of 1,048,576 rows was accepted and 1,048,577 refused, and 16,384 columns were accepted and 16,385 refused. A 40,000-character cell was cut to 32,767 characters, as stated.
CSV to Excel FAQ
Will my ZIP codes and IDs keep their leading zeros?
Yes. Stored as a number, 02134 would read back as 2134, so it stays text. Only values that survive the trip to a number and back unchanged become numbers.
Why do some values not add up in Excel?
Cells the tool keeps as text on purpose, such as 02134 or a 16-digit card-style number, are text in the workbook, and Excel's SUM ignores text cells. Change such a column to numbers in Excel before totalling it, if the leading zeros or the extra digits do not matter to you. Values such as 3.50 are written as numbers and need no conversion.
What happens to a 16-digit number?
It is written as text, so every digit stays. Excel keeps only 15 significant digits, so as a number cell a card number would end in 0. The rule covers any value of more than 15 digits, quoted in the CSV or not, and SUM skips those cells.
Are dates and formulas recognised?
No. 2026-10-31 is written as the text 2026-10-31, and =SUM(A1:A2) is written as text, never as a formula, so nothing in the file runs when it opens. Change the column type in Excel afterwards if you want real dates.
What does Treat first row as a header do?
Ticked, the default, the first row stays as text, even a column called 2026, and Excel shows filter buttons on it. Unticked, it is ordinary data with no filter, so untick it if your CSV has no header line. No row is dropped either way.
Can several CSV files go into one workbook?
No. One CSV makes one workbook with one sheet. Convert each file and copy the sheets together in Excel.
Why are some numbers in my column text?
Values with a leading zero (02134), a plus sign, an exponent (1e10) or more than 15 digits are kept as text on purpose, so IDs and long numbers do not change. Decimals such as 12.50 or 714.0 are numbers that carry a number format with the same number of decimals. In our 10,000-row test of generated prices and scores, every value was a number.