XLS (Microsoft Excel Binary File Format)

The legacy binary format for Microsoft Excel spreadsheets (97-2003)

Overview

XLS is the legacy binary file format used by Microsoft Excel for spreadsheets from Excel 97 through Excel 2003. Before being replaced by the XLSX format in Excel 2007, it was the standard format for Excel spreadsheets and became widely used in business, finance, science, and many other fields.

XLS files can store various types of data including text, numbers, formulas, macros, charts, and formatting information. The format uses a proprietary binary structure known as Binary Interchange File Format (BIFF), making it challenging to work with outside of Microsoft's applications.

Despite being officially superseded by XLSX, the XLS format continues to be used in many organizations, particularly in environments with older software or established systems that were built around this format. It remains supported in modern versions of Excel and other spreadsheet applications for backward compatibility.

Technical Specifications

File Extension .xls
MIME Type application/vnd.ms-excel
Developer Microsoft Corporation
Format Type Binary (BIFF8)
Used By Excel 97-2003 (native), Excel 2007+ (compatibility)
Maximum Rows 65,536
Maximum Columns 256 (A-IV)
Max File Size ~2GB (practical limit)

XLS files use a complex binary structure based on the Compound File Binary Format (similar to a mini file system). The format stores workbooks containing one or more worksheets, along with formulas, functions, charts, macros (in VBA), and various formatting information. Its binary nature made it efficient for the computing resources of its era but created challenges for interoperability and long-term data preservation.

Advantages & Disadvantages

Advantages

  • Wide compatibility with legacy systems and older software
  • Smaller file size than XLSX for basic spreadsheets without compression
  • Faster saving and opening in some cases for simpler files
  • Established format with well-understood behavior in Excel
  • Supported by virtually all spreadsheet applications
  • No need for XML processing capabilities
  • Compatible with older versions of Microsoft Excel (97-2003)
  • Robust VBA macro support understood by many legacy systems

Disadvantages

  • Limited to 65,536 rows and 256 columns
  • Proprietary binary format with limited documentation
  • More susceptible to corruption than newer formats
  • Security concerns due to automatic macro execution
  • Lacks support for newer Excel features
  • No native support for themes and some advanced formatting
  • Less suitable for data interchange between different systems
  • No longer actively developed or improved
  • Poor compression compared to XLSX

Common Use Cases

Legacy System Compatibility

XLS remains essential in environments using older versions of Microsoft Office (pre-2007) or legacy systems built around this format. Many enterprise applications, particularly in finance, healthcare, and government sectors, were designed to work specifically with XLS files and haven't been updated to support newer formats.

Established Workflows

Organizations with established spreadsheet templates, macros, and procedures built for XLS often continue using this format to avoid disrupting workflows. Converting complex spreadsheets with extensive macros and custom functionality to newer formats can be challenging and costly, leading many businesses to maintain XLS compatibility.

VBA Macro Distribution

Some organizations distribute spreadsheets with VBA macros in XLS format because the macro behavior is well-understood and consistent in this format. While XLSM (the macro-enabled variant of XLSX) is now preferred for new development, legacy macros sometimes function more predictably in XLS.

Basic Data Exchange

For simple spreadsheets where the larger data capacity of XLSX isn't needed, XLS can serve as a compact format for data exchange. Some users prefer XLS for smaller datasets because the files open quickly in most applications without the overhead of processing and uncompressing XML content.

Archival Data

Historical spreadsheets from the 1990s and early 2000s are often archived in XLS format. While not ideal for long-term preservation, many organizations maintain archives of XLS files that represent important historical data and calculations from earlier periods.

Compatibility

Microsoft Office Compatibility

XLS is supported across Microsoft Office versions:

  • Excel 97-2003: Native format with full compatibility
  • Excel 2007-2025: Full backward compatibility for reading and writing
  • Excel Online: Can view and edit with some limitations
  • Excel Mobile: Basic support for viewing and editing

Other Spreadsheet Applications

Many non-Microsoft applications support XLS files:

  • LibreOffice/OpenOffice Calc: Good compatibility, occasional formula or formatting issues
  • Google Sheets: Can import and edit, with some advanced feature limitations
  • Apple Numbers: Import capabilities with some formatting differences
  • Zoho Sheet: Good support for basic XLS functionality
  • WPS Spreadsheets: Strong XLS compatibility

Programming Libraries

Various libraries can work with XLS files:

  • Apache POI: Java library with robust XLS support
  • EPPlus: .NET library with XLS capabilities
  • PHPExcel/PhpSpreadsheet: PHP libraries for XLS manipulation
  • Pandas (with xlrd): Python data analysis with XLS support
  • SheetJS: JavaScript library that can handle XLS files

Platform Compatibility

XLS files can be used across various platforms:

  • Windows: Excellent support through Microsoft Office and alternatives
  • macOS: Good support through Office for Mac and alternatives
  • Linux: Support through LibreOffice, OpenOffice, and other tools
  • Mobile: Various apps on iOS and Android offer XLS support
  • Web: Online spreadsheet applications like Google Sheets can import XLS

Comparison with Similar Formats

Feature XLS XLSX CSV ODS PDF
File Format Binary XML/ZIP Text XML/ZIP Binary
Row Limit 65,536 1,048,576 Unlimited 1,048,576 N/A
Column Limit 256 16,384 Unlimited 1,024 N/A
Formatting ★★★★☆ ★★★★★ ★☆☆☆☆ ★★★★☆ ★★★★★
Formulas ★★★★☆ ★★★★★ ★☆☆☆☆ ★★★★☆ ★☆☆☆☆
Macros ★★★★★ ★★★★☆ ★☆☆☆☆ ★★★☆☆ ★☆☆☆☆
Open Format ★☆☆☆☆ ★★★☆☆ ★★★★★ ★★★★★ ★★★★☆
File Size ★★★☆☆ ★★★★☆ ★★★★★ ★★★★☆ ★★☆☆☆

XLS offers good legacy compatibility and strong macro support but has significant limitations in data capacity compared to XLSX. CSV provides maximum simplicity and interoperability but lacks formatting and calculation capabilities. ODS offers an open standard alternative with good features, while PDF excels at layout preservation but sacrifices editability.

Conversion Tips

Converting To XLS

From XLSX

When converting from XLSX to XLS, be aware of the row and column limitations (65,536 rows and 256 columns). Any data beyond these limits will be truncated. Some newer features like slicers, timelines, and certain chart types aren't supported in XLS. Use "Save As" in Excel and select "Excel 97-2003 Workbook (*.xls)" format. Review the compatibility checker warnings to identify potential issues.

From CSV

Converting from CSV to XLS is generally straightforward. Import the CSV file into Excel or another spreadsheet application, then save as XLS format. Pay attention to text encoding, especially for international characters. For date and number formatting, you may need to manually adjust formats after import as CSV doesn't store this information. Consider using Excel's Text Import Wizard for more control over the import process.

From ODS

When converting from OpenDocument Spreadsheet (ODS) to XLS, use LibreOffice or OpenOffice's "Save As" function. Complex formatting and some functions may not translate perfectly. Charts and graphics typically convert well, but check for positioning issues. Macros in ODS won't convert to VBA automatically and will need to be rewritten.

Converting From XLS

To XLSX

Converting XLS to XLSX generally works well and allows you to take advantage of newer Excel features and larger data capacity. Open the file in a recent version of Excel and use "Save As" to select the XLSX format. Most formatting, formulas, and basic macros will convert successfully, though you may need to review and update complex VBA code that interacts with Excel's object model.

To CSV

When converting XLS to CSV, remember that you'll lose all formatting, multiple worksheets, formulas (only values will be preserved), and any charts or graphics. Each worksheet must be saved as a separate CSV file. Use "Save As" and select "CSV (Comma delimited) (*.csv)" format. For international characters, pay attention to the encoding options. Consider creating a copy of your XLS file before conversion to preserve the original.

To PDF

Converting XLS to PDF creates a fixed-layout document that preserves the appearance but removes editability. Use the "Export to PDF" or "Save As PDF" function in your spreadsheet application. Set print areas appropriately before conversion to control what appears on each page. Consider page orientation, scaling options, and whether to include gridlines and headers. For multi-sheet workbooks, specify whether to convert all sheets or only active ones.

XLS Best Practices

  • Keep file sizes manageable by limiting unnecessary formatting
  • Use named ranges to make formulas more readable and maintainable
  • Implement error checking in critical formulas
  • Be cautious with macros due to potential security issues
  • Create separate backup copies before major edits
  • Structure data consistently for easier analysis
  • Consider XLSX for new spreadsheets unless XLS is specifically required
  • Don't rely on color alone for data interpretation (add labels)

Frequently Asked Questions

What's the difference between XLS and XLSX?
The primary differences are in format structure and capabilities. XLS is a binary format with limitations of 65,536 rows and 256 columns, while XLSX is XML-based and supports over 1 million rows and 16,384 columns. XLSX files are typically smaller due to ZIP compression, have better recoverability from corruption, offer improved security features, and support newer Excel functionality like improved conditional formatting and data visualizations. XLS remains valuable primarily for backwards compatibility with older systems and established workflows.
Should I still use XLS format for new spreadsheets?
For new spreadsheets, XLSX is generally recommended over XLS unless you have specific compatibility requirements with older systems or software. XLSX offers larger data capacity, better security, improved recovery from corruption, smaller file sizes, and access to newer Excel features. However, XLS might still be appropriate if your spreadsheet needs to be accessed by users with Excel 2003 or earlier, or if it needs to integrate with legacy systems that only support the XLS format.
Are XLS files secure?
XLS files have several security considerations. They can contain macros that execute automatically, potentially harboring malicious code. The format has been targeted by attackers historically due to its widespread use and various exploitable vulnerabilities have been discovered over the years. While basic password protection is available, the encryption in XLS files (especially from older versions) is relatively weak by modern standards. For better security, consider using XLSX with its improved encryption options or converting sensitive data to non-executable formats like PDF for distribution.
How can I recover data from a corrupted XLS file?
For corrupted XLS files, try these recovery approaches: use Excel's built-in repair feature by selecting "Open and Repair" from the Open dialog; try opening the file in an alternative application like LibreOffice Calc which might be more tolerant of certain corruption types; use specialized file recovery software designed for Office documents; or if those fail, try hex editor tools to extract text fragments directly from the binary structure. Prevention is best—maintain regular backups and consider using XLSX which has better corruption recovery due to its segmented XML structure.
Why won't my XLS file open in another application?
Compatibility issues with XLS files can stem from several causes: the file might contain features specific to Excel that aren't supported in the other application; complex formatting or formulas might not translate correctly; embedded objects or macros might not be compatible; or the file might be corrupted. Try opening the file in Excel and saving in a more universal format like CSV for maximum compatibility, or use Excel's "Save As" function to create an older version XLS file that might have better compatibility with other applications.