Introduction
.xls is the extension of
Microsoft Excel’s binary
workbooks, the default format until Excel 2007 replaced it with
XLSX. The format is called BIFF, the Binary
Interchange File Format: a sequence of records, each a type, a length and data.
Each major Excel version changed BIFF. Excel 2.x, 3.0 and 4.0 wrote BIFF2, BIFF3 and
BIFF4 as plain record files. Excel 5.0 (1993) and Excel 95 wrote BIFF5 inside a compound
file, and Excel 97 to 2003 wrote BIFF8, which added Unicode text and a shared string
table. Nearly all .xls files met today are BIFF8.
Variations
| Format | Variation | About | Open |
|---|---|---|---|
.XLS | Excel 5.0 and 95 workbook (BIFF5) | Excel 5.0 and 95 workbooks: BIFF records in a compound file’s Book stream. | Open |
.XLS | Excel 97–2003 workbook (BIFF8) | Excel 97–2003 workbooks: BIFF records and a shared string table in a compound file. | Open |
Excel 5.0 and 95 (BIFF5)
The first BIFF stored in a compound file, which let a workbook hold several sheets. Text is stored in single-byte characters of a code page, inside the cell records.
The compound file holds a stream named Book. Its first record is a BOF
record (type 0x0809) whose version field is 0x0500.
Excel 97 to 2003 (BIFF8)
The last and most common BIFF. Text can be Unicode, and the text of cells is kept once in a shared string table that the cells refer to by number.
The compound file holds a stream named Workbook. Its first record is a
BOF record (type 0x0809) whose version field is 0x0600.
Links
Software
- Microsoft Excel (Windows, macOS, web, mobile)
- LibreOffice Calc (Windows, macOS, Linux)
- Google Sheets (web browsers)
- Apple Numbers (macOS, iOS)
Developers
- xlrd, Python library that reads
.xlsfiles - Apache POI, Java library for Office files,
.xlsthrough its HSSF classes - SheetJS, JavaScript library that reads and writes spreadsheets