.xls

What is a .xls file?

Microsoft Excel 97-2003 Spreadsheet · Document · Microsoft · 1997

XLS is the classic Microsoft Excel spreadsheet format used until 2007, before XLSX. It is a binary OLE2 compound file holding cells, formulas, formatting and charts. Excel still opens it.

Category
Document
Type
Binary
Is a .xls file safe to open? Mostly safe, but .xls can contain macros. Keep macros disabled unless you trust the source; malicious spreadsheet macros are a known attack route.

What is a .xls file used for?

An .xls file stores a workbook of sheets, formulas and formatting in the OLE2 compound-file structure it shares with old Word and PowerPoint. Excel 2007 replaced it with the XML-based XLSX.

XLS is limited to 65,536 rows per sheet, one reason the newer XLSX (over a million rows) took over. Excel, LibreOffice Calc and Google Sheets all still read .xls.

How to open a .xls file

The .xls format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list. For a step-by-step walkthrough, see how to open a .xls file.

Windows

  • Microsoft Excel
  • LibreOffice Calc
  • WPS Office

macOS

  • Microsoft Excel
  • Numbers
  • LibreOffice Calc

Linux

  • LibreOffice Calc
  • OnlyOffice

Web

  • Google Sheets
  • Microsoft 365 for the web

How to convert a .xls file

You can convert a .xls file to xlsx, csv, ods, pdf using a conversion tool or the export menu of an app that opens it.

.xls file signature (magic bytes)

Programs recognise a .xls file by the bytes at the start of the file, not by its name. These are the signatures for XLS. For a full breakdown, see the XLS file signature page.

Hex signatureOffsetNote
D0 CF 11 E0 A1 B1 1A E10OLE2 compound file

See the full magic-numbers reference for every format.

Frequently asked questions

What is a .xls file?

XLS is the classic Microsoft Excel spreadsheet format used until 2007, before XLSX. It is a binary OLE2 compound file holding cells, formulas, formatting and charts. Excel still opens it.

What is the difference between XLS and XLSX?

XLS is the old binary format (Excel 97-2003), capped at 65,536 rows. XLSX, from Excel 2007, is a ZIP of XML with over a million rows and smaller files.

How do I open an .xls file?

Excel, LibreOffice Calc, Google Sheets and Numbers all open .xls, and can convert it to XLSX or CSV.

Why does Excel warn about macros in an .xls?

Old spreadsheets can embed VBA macros that run code. Excel disables them by default; only enable macros for files you trust.

Related formats

Sources

Details on this page were checked against authoritative references: