What is the XLS file format?
A file with the .xls extension is a spreadsheet document created with Microsoft Excel. .xls is a binary format built on the OLE2 Compound File Binary (CFB) container, internally organized as BIFF8 (Binary Interchange File Format, version 8) records. This binary format was used by Microsoft Excel versions 97 through 2003; older Excel 5.0/95 workbooks used the earlier BIFF5 variant. The full .xls specification document - more than 1,000 pages long - is published by Microsoft on its Open Specifications portal.
.xls has been superseded by the newer .xlsx format, which is an XML-based spreadsheet format using UTF-8 encoding. Despite that, .xls files remain widely used and are still supported by most spreadsheet tools. An .xls workbook can contain:
- Tables storing text or numbers
- Formulas and named ranges
- Links to external resources
- Charts and graphs
- Images and embedded objects
An .xls spreadsheet stores data in cells organized in a grid of rows and columns, where each cell has a unique address. Workbooks can hold multiple sheets, allowing users to organize related data across tabs. Spreadsheet documents can be used for performing calculations, creating documentation, or organizing and visualizing data. Users can format text, build charts, or write formulas based on cell data. Depending on the application, .xls files can be exported into other formats, including .ods or plain .csv.
Security & safety
RISK: MEDIUMUnlike a plain XLSX, a legacy XLS can carry VBA macros, making it a classic malware vector - an .xls attachment that prompts "Enable Content / Enable Macros" should be treated with suspicion, especially if unexpected. Excel opens internet/email files in Protected View; leave it on and don't enable editing or macros for files you didn't expect. Opening the file in Google Sheets or LibreOffice avoids Excel's VBA engine entirely. The format can also embed OLE objects and external links. If you only need to read the data, a free web viewer is the safest route.
Format details
in a nutshellPrograms that open XLS files
Technical details
deep spec| Container format | OLE2 Compound File Binary (CFB) |
| Internal record format | BIFF8 (Binary Interchange File Format, version 8) |
| MIME type | application/vnd.ms-excel |
| Magic bytes (hex) | D0 CF 11 E0 A1 B1 1A E1 at offset 0 - OLE2 CFB header shared with .doc and .ppt |
| Maximum rows per sheet | 65,536 (2¹⁶) |
| Maximum columns per sheet | 256 (columns A-IV; 2⁸) |
| String encoding | UTF-16 LE inside BIFF8 Unicode string records |
| Numeric precision | 64-bit IEEE 754 double-precision floating point (15-17 significant digits) |
| Formula storage | Binary token array (RPN-style "ptg" tokens) inside Formula records |
| Shared String Table (SST) | Duplicate cell strings stored once and referenced by index, reducing file size |
| VBA macro storage | Embedded in a separate "_VBA_PROJECT" OLE stream within the CFB container |
| Compression | None - no built-in compression (contrast with XLSX, which wraps XML in a ZIP archive) |
| Encryption | Optional RC4-based or XOR-based password protection of workbook streams |
| Developer | Microsoft Corporation |
| Released | 1987 (Excel 1.0); BIFF8 .xls used Excel 97-2003; superseded by XLSX in 2007 |
| Specification | learn.microsoft.com |
XLS conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about XLS files.