XLS

What is an XLS file?

The old binary Excel format, capped at 65,536 rows.

What XLS is

XLS is a binary format, meaningful only to a program that knows it. It is used for editing.

The extension is .xls, and the full name is Excel 97-2003 Workbook. Both matter less than what the file can hold, which is what the rest of this page is about.

Where XLS came from

Microsoft published it in 1987.

A format that has been readable for that long is a format worth trusting with something you want back in ten years.

The specification is published, but by its owner

It is written down and implementable, though the vendor decides what the next version looks like. In practice that is enough for the file to keep opening; it is not enough to be sure of it.

It is a legacy format

It still opens everywhere and is still written by older tools, but nothing new is being built around it. Convert what you mean to keep, and do not choose it for something starting today.

It can hold several pages in one file

XLS is not limited to one page, which matters when converting to something that is: one conversion produces one file holding a single page — the first one, unless the page is something the converter lets you pick.

What kind of document it is

XLS holds a spreadsheet: cells, formulas and the sheets around them.

That is what decides how it converts: a spreadsheet becomes a print area, and a print area is a decision somebody has to make about where the columns break.

What opens XLS

Microsoft Excel and LibreOffice Calc read it, and so do most programs of the same kind.

If a file will not open, the format is rarely the problem — it is more often that the program predates it. Converting to something older is the reliable way past that, and it is what the rest of this site is for.

Opening it in a browser

No browser reads it.

That is the single most common reason to convert it: not that the format is bad, but that the place you want to show the file cannot read it.

It is a working format

XLS is meant to be opened and changed. Keep the file in this format for as long as the work is going on, and export from it whenever a finished copy is needed.

A file nobody has made this decade

Excel wrote XLS until 2003 and has defaulted to XLSX since 2007. So a file with this extension was almost certainly inherited: a departmental workbook that has been passed along since before the people using it arrived, a template from a supplier, an export from software that has not been updated in fifteen years.

Underneath it is a Microsoft compound file — a small structured container of binary streams, the same technology as the old .doc and .ppt. It was never a published standard in the way its successor is; the specification was reverse-engineered for years before Microsoft documented it, and that history is why non-Microsoft software has always read it slightly differently.

The 65,536-row wall

This is the limit that turns an inherited XLS from an inconvenience into a problem. A worksheet holds at most 65,536 rows and 256 columns. XLSX raised those to just over a million rows and 16,384 columns.

The dangerous part is the failure mode. Import a data export with 80,000 rows into an XLS worksheet and Excel does not refuse — it takes the first 65,536 and warns in a dialog somebody clicks through. The workbook then looks complete and quietly is not. If any process in your organisation still passes data through XLS, this has probably happened at least once.

Macros, and why the extension tells you nothing

An XLS can contain VBA macros, and nothing in the extension says whether it does. That is precisely what the modern formats fixed: XLSX cannot hold macros at all, and a workbook needing them must be XLSM, which announces itself.

Macro-bearing spreadsheets were one of the most effective malware delivery routes ever used, and they still turn up. A workbook arriving by email from an unfamiliar sender deserves suspicion in a way a modern XLSX does not, and converting to XLSX or PDF strips any macro content as a side effect.

What breaks when it is opened elsewhere

LibreOffice Calc, Google Sheets and Numbers all read XLS, and all of them approximate. Ordinary sheets of numbers and formulas come through faithfully. What tends to shift is the old-fashioned material: charts built with the 1990s chart engine, conditional formatting written before it was standardised, pivot tables, ActiveX controls and embedded objects from applications that no longer exist.

A related trap is the date system. Workbooks written on a Mac in that era may use a 1904 date base rather than 1900, and a file carrying that setting shows every date four years out when the setting travels badly. It is rare, it is confusing, and this is what it looks like when it happens.

Converting to XLSX, which is the right move

The conversion gains a great deal for almost no effort. A file typically shrinks by half or more because XLSX is compressed. The row and column limits disappear. It becomes a documented open standard rather than a reverse-engineered binary, so more software reads it and will continue to. And any macro content goes.

What to check afterwards is narrow: charts, pivot tables and anything using an embedded object. Formulas, formatting, named ranges and multiple sheets carry across reliably. Converting an archive of old workbooks now is considerably cheaper than converting them one at a time when somebody finds that nothing will open them.

And when PDF is the better destination

When the workbook is finished. A set of accounts being filed, a price list going to a customer, a report attached to an application — none of those need to recalculate, and a PDF removes every question about whether the recipient has Excel and what their column widths will do to your layout.

The one thing worth doing first is setting the print area, the orientation and the scaling, because a spreadsheet has no page size and a PDF does. A workbook that was never set up for printing converts as a workbook that was never set up for printing, with columns spilling onto pages of their own.

Getting data out of one

If the target is a database, a script or an analysis tool, convert to CSV rather than to XLSX. It is what import routines expect, it streams, and it cannot carry macros or external links — which is why security-conscious systems ask for it by name.

The cost is everything that is not one sheet of values: other sheets, formulas (you keep their results), formatting and charts. For moving data that is the correct trade, and for keeping the workbook it is not. Converting to both is often the honest answer — CSV for the pipeline, XLSX for the file.

The facts, in one place

Identifiers and provenance for the XLS format.
Extension.xls
Media typeapplication/vnd.ms-excel
Published byMicrosoft
First published1987

XLS files: common questions

How do I open an XLS file without Excel?

LibreOffice Calc and Google Sheets both read it, and Numbers on a Mac will import one. All of them approximate the older material — charts from the 1990s engine, pivot tables and embedded objects — while ordinary sheets of numbers and formulas come through faithfully.

What is the difference between XLS and XLSX?

XLS is the pre-2007 binary format, capped at 65,536 rows and 256 columns, and able to hold macros without saying so. XLSX is a compressed package of XML with limits of about a million rows and 16,384 columns, and it cannot contain macros at all.

Why did my import lose rows?

The 65,536-row limit. Excel does not refuse a larger import — it takes the first 65,536 and warns in a dialog that is easy to click through, leaving a workbook that looks complete and is not. Converting to XLSX removes the limit.

Are XLS files a security risk?

They can be. The format can carry VBA macros with nothing in the extension to indicate it, and macro-bearing spreadsheets have been one of the most effective malware routes in use. Converting to XLSX or PDF strips any macro content.

Why are all my dates four years out?

The workbook uses the 1904 date base that Excel for Mac used in that era, rather than the 1900 base, and the setting has not travelled with the file. It is rare and it is exactly what a four-year offset on every date looks like.

Should I convert to XLSX or CSV?

XLSX to keep the workbook — formulas, sheets, formatting and named ranges all survive, and the file usually halves in size. CSV to move the data into a database or a script, accepting the loss of everything that is not one sheet of values.