XLS to CSV — a binary workbook, a text file
The .xls container predates XML: it is a BIFF record stream inside an OLE compound file. The reader understands those records, so a workbook from Excel 97 becomes CSV without Excel being involved. What leaves is data only — the record stream carries formatting, macros and formula definitions, and none of that survives into a delimited file.
Cell formatting, colours, column widths and merged ranges are dropped; only stored values survive.
Processed on your device. Files aren’t sent anywhere.
What the binary format carries
- Cell records with values and number formats.
- Formula records that store the formula text plus its last cached value.
- Label records for text, stored under the workbook encoding.
- Formatting and column-width records with no CSV equivalent.
- Macro streams that are never executed.
Reading cells without executing anything
A formula cell is read as its cached value. The converter never recalculates, so a workbook whose last save was made by a broken spreadsheet shows that stale value. External links are not followed and nothing is fetched from the network.
A legacy workbook is a historical record. Its cached values are the last thing Excel computed, and a converter reports those, not a fresh calculation.
Note on formula honesty
Dates and encoding of legacy workbooks
Dates are stored as serial numbers plus a number format, and the displayed text is what reaches the CSV, so a custom format exports the text Excel showed rather than the serial. Old workbooks store text under a single-byte encoding declared inside the file; workbooks written by third-party tools can carry inconsistent codepages, so accented names are worth checking against the original application. The CSV output is UTF-8 with a byte order mark and CRLF endings.
Sheet choice
Make the worksheet choice before handing the CSV to an importer. A workbook can contain a summary followed by its underlying ledger, and exporting both can mix different kinds of rows into one stream. The destination needs one consistent column meaning. Read the first few records and the boundary between appended sheets; a valid CSV can still be the wrong dataset for that job.
| Option | Result |
|---|---|
| First sheet | one CSV from the first worksheet in workbook order |
| Named sheet | the selected worksheet only |
| Every sheet | sheets appended one after another, no separator line |
Why appending is not a merge
With every sheet selected, the sheets are written one after another. There is no blank separator row and no sheet name in the output, so a two-sheet workbook becomes one longer table. Use the named-sheet option when the CSV feeds an import that expects a single header row.
Checking the CSV
- Convert the .xls file and download the CSV.
- Open it in a text editor rather than Excel first, to see the raw fields.
- Compare the row count with the sheet you selected.
- Check accented text against the original application.
- Convert numeric columns to numbers before importing.