Skip to content
Server-sideDeleted in 30 minutes

Convert XLS to CSV

A .xls is an opaque binary that needs Excel or a library to read at all, which makes it a poor place for data that a pipeline has to consume. CSV is the opposite. The two things worth knowing before you rely on the output are that the first sheet is the only one exported, and that files written in the 1990s frequently used a regional code page rather than Unicode.

Use this without the search next time. Prathom Workbench puts Prathom's tools in your toolbar.

Add to Chrome — free
XLSCSV

Drop your XLS file here, or click to browse

Up to 50 MB. Deleted automatically after 30 minutes.

What it does

  • The first sheet is exported; the rest stay in the workbook
  • Formulas contribute their computed values
  • Text is written as UTF-8 whatever the original file used

How to use XLS to CSV

  1. 1

    Upload the .xls

    Any legacy binary workbook. Files from very old versions of Excel and from other software that wrote the format both work.

  2. 2

    The first sheet becomes the file

    CSV holds one table. Anything on a later tab is not in the output, which is easy to miss in a workbook nobody has opened in years.

  3. 3

    Check the accented characters

    Old files often stored text in a regional code page. The output is UTF-8, so look at any names or addresses with accents to confirm they came through.

How it works

The compound binary is opened, its first worksheet is read, and each row is written as a line of comma-separated values with proper quoting. Cells holding formulas contribute their stored computed value.

Text is decoded using the encoding the workbook declares and re-encoded as UTF-8. That step is invisible when it works and very visible when it does not, which is why it is worth naming.

Why get data out of .xls at all

Because almost nothing can read it without help. A database import tool, a shell script, a statistics package or a data pipeline all handle CSV natively and need a library or a copy of Excel for the binary. Converting is usually the first step in making an old dataset usable again.

There is also the durability argument: a binary from 1997 depends on software that understands a format nobody maintains, while a CSV is legible in a text editor forever.

The encoding trap

Old workbooks store text in whatever code page the machine used, and a name written in a Western European code page contains bytes that mean something else in a Central European one. The conversion handles this correctly on the way out by writing UTF-8. The place it still goes wrong is downstream, when a tool opens the CSV assuming a legacy encoding. Tell your importer it is UTF-8 and the problem disappears.

If you need more than the data

Convert to .xlsx instead. That keeps every sheet, the formulas as formulas, and the formatting, and it is a far better long-term home for the workbook than the binary it came from.

The encoding is the thing that bites

Old .xls files predate the assumption that text is Unicode. They were written by machines set to a regional code page — Windows-1252 in Western Europe, Windows-1251 for Cyrillic, Shift-JIS in Japan — and the file records the characters without always recording which of those was meant.

A conversion has to pick, and what you notice when it picks wrong is accented letters becoming pairs of symbols, or names arriving as question marks.

Open the CSV and look at the accented characters, the currency symbols and any non-Latin text before feeding it to anything. If they are wrong, the values are recoverable — the bytes are intact and only the interpretation is off — but the fix is easier before the data has been loaded somewhere else.

Examples

An archived customer list going into a database

customers-1999.xls - 2 sheets, 14,000 rows, 6 MB
customers-1999.csv - first sheet, 14,000 rows, 1.1 MB

The import tool can read this where it could not read the binary. The second sheet was a lookup table and is still only in the .xls, which is worth exporting separately rather than forgetting.

A sheet with accented names

staff.xls - written in a Western European code page
staff.csv - UTF-8, accents intact

The conversion reads the file with its declared encoding and writes UTF-8, so names survive. If your downstream tool shows question marks, it is reading the CSV as something other than UTF-8.

Frequently asked questions

Why does only one sheet come out?

Because a CSV file is a single table with no concept of a workbook. There is no standard way to put several sheets into one CSV, and any convention invented for it would produce a file that nothing else could parse. Export the sheets one at a time by moving each to the front of the workbook, or convert to XLSX or ODS if the multiple sheets are the point.

What encoding is the output?

UTF-8. This matters more with legacy files than with modern ones, because .xls predates Unicode being the default and older workbooks routinely stored text in a regional code page. The conversion reads the file with the encoding it declares and writes UTF-8, so accented and non-Latin characters survive. Question marks downstream mean the reader is guessing the wrong encoding, not that the file is damaged.

Do I lose the formulas?

The formulas are replaced by the values they had produced, because CSV cannot store a calculation. For getting data into a pipeline this is what you want. It does mean the CSV is a snapshot: if the workbook is still in use and its numbers change, the export has to be repeated rather than being expected to follow.