CSV to XLSX — what the workbook gains and what it does not
A CSV export from a billing tool opens in Excel as a wall of text. Converting it to .xlsx gives the file a real worksheet container: a sheet name, a used range, columns you can widen and sort. What the converter cannot invent is the data model — a delimited file stores characters, not types, so numbers arrive as text.
Cell formatting, colours, column widths and merged ranges are dropped; only stored values survive.
Processed on your device. Files aren’t sent anywhere.
The container changes, the values do not
CSV is a byte stream with one convention: a separator between fields and a line break between rows. XLSX is a compressed package holding sheet XML, a shared string table and a workbook part. Converting builds that package around the same characters, which is why the row count in the report matches the line count a text editor would show.
- The first row becomes the first worksheet row; it is not a header by definition.
- Quoted fields keep their commas and quotes exactly as the source stored them.
- A field containing a line break stays inside one cell.
- An empty field becomes an empty cell, so column positions survive.
- Trailing empty cells at the end of a row are trimmed, because the used range can reach past the last value.
What the workbook adds for Excel
| In the CSV | In the worksheet | Behaviour |
|---|---|---|
| "a,b" | a,b | comma kept inside one cell |
| (nothing) | (empty cell) | column position preserved |
| 1200 | 1200 | stored as text |
| say ""hi"" | say "hi" | doubled quote unescaped |
Types are a decision you make afterwards
Excel does not know that a column was meant to be money. The cells hold text, so sums return zero until you convert the column. The honest order is: download the workbook, select the numeric column, apply the number format, then convert the values. Anything else silently produces wrong totals.
Questions
Does the converter guess numeric columns?
Can a field contain a comma?
What happens to a field with a newline inside?
How large a file is accepted?
Encoding and line endings
The output is UTF-8 with a byte order mark and CRLF line endings. A source file written in Windows-1251 or Shift-JIS is decoded as UTF-8, so accented or CJK text can arrive replaced. If the export came from an old ERP system, check the characters before trusting the workbook. A file that already starts with a byte order mark is handled correctly; the mark never becomes a cell.
Checking the workbook
- Convert the .csv file and download the .xlsx.
- Compare the row count in the report with the line count of the source.
- Open a quoted field containing a comma and confirm it stayed in one cell.
- Convert numeric columns to numbers before summing.
- Save the workbook once Excel has the formats you want.