From financial forecasting models and inventory logs to statistical analyses and scientific data tables, the spreadsheet is the engine of modern business. For the past two decades, the overwhelming majority of these spreadsheets have been saved with the .xlsx extension.

What is an XLSX file, how does its internal XML architecture differ from legacy binary .xls files, and how does it store millions of cells with high efficiency?

The Transition from Binary XLS to Open XML (XLSX)

Before Excel 2007, Microsoft saved spreadsheets in the Binary Interchange File Format (BIFF), ending with the .xls extension. These files were proprietary binary byte streams:

  • They were notoriously prone to silent file corruption.
  • They could not be inspected or modified without proprietary binary parsing libraries.
  • They posed significant security risks because executable binary macro code could be obscured inside the document streams.

In response to international standards demands for open document architectures, Microsoft developed the Office Open XML (OOXML) specification, ratified as ECMA-376 in 2006 and ISO/IEC 29500 in 2008. The .xlsx format is the SpreadsheetML implementation of this open standard.

The Secret Architecture: An XLSX File is a ZIP Package

An .xlsx file is not a monolithic binary file; it is an Open Packaging Conventions (OPC) compliant ZIP archive.

If you change the file extension of any .xlsx spreadsheet to .zip and extract its contents, you will discover a structured directory of XML files and relationship manifests:

workbook.xlsx (ZIP Container)
├── [Content_Types].xml        (Defines MIME types for every part)
├── _rels/
│   └── .rels                  (Top-level package relationships)
├── docProps/
│   ├── app.xml                (Application metadata: Excel version, sheet count)
│   └── core.xml               (Author, created date, last modified date)
└── xl/
    ├── workbook.xml           (Workbook structure: sheet names and IDs)
    ├── styles.xml             (Font definitions, number formats, cell fills, borders)
    ├── sharedStrings.xml      (Crucial: Global table of unique text strings)
    ├── worksheets/
    │   ├── sheet1.xml         (Raw cell coordinates, formulas, and numeric values)
    │   └── sheet2.xml
    └── _rels/
        └── workbook.xml.rels  (Links workbook.xml to individual worksheets)

The Genius of sharedStrings.xml: Optimizing Memory

In large business spreadsheets, repetitive text words (such as “California”, “Approved”, or “In Stock”) appear thousands or millions of times across different rows.

If an XLSX file stored the text string “Approved” inside every single cell tag, a 100,000-row spreadsheet would bloat to tens of megabytes. Instead, SpreadsheetML employs an elegant string deduplication mechanism called Shared Strings:

  1. Every unique text string in the entire workbook is written exactly once inside xl/sharedStrings.xml and assigned an integer index (0, 1, 2, …).
  2. Inside xl/worksheets/sheet1.xml, the cell merely references that integer index:
    <c r="A1" t="s">
      <v>42</v>
    </c>
    
    (Here, r="A1" indicates cell coordinate A1, t="s" specifies that the type is a Shared String, and <v>42</v> points to string index 42 in sharedStrings.xml).

Numeric numbers and formula equations, on the other hand, are stored directly inside the sheet XML to allow rapid mathematical evaluation.

Comparing XLSX to Legacy XLS and CSV

Feature XLSX (Open XML) XLS (Legacy Binary) CSV (Comma-Separated)
Format Nature Compressed ZIP package with XML Proprietary binary stream (BIFF8) Flat plain text
Max Rows per Sheet 1,048,576 rows 65,536 rows Unlimited (text stream)
Max Columns per Sheet 16,384 columns (XFD) 256 columns (IV) Unlimited
Stores Formulas Yes Yes No (Values only)
Stores Multiple Tabs Yes Yes No (Single table only)
Formatting / Charts Yes Yes No
Macro Execution No (Macros require .xlsm) Yes (Embedded VBA allowed) No

(Note: Microsoft intentionally separated macros in modern Open XML formats. Standard .xlsx files cannot execute VBA code; documents containing macros must use the .xlsm extension, making macro-based malware dramatically easier for firewalls to detect).

How to Open and View XLSX Files

  1. Microsoft Excel: The native software tool.
  2. LibreOffice Calc (Free): Full read and write compatibility without subscription costs.
  3. Google Sheets: Free cloud editing. Drag and drop any .xlsx file into Google Drive to edit or share.
  4. Programmatic Data Science (Python / Node.js): Because XLSX is open XML, developers can read and generate spreadsheets without running Excel:
    import pandas as pd
    df = pd.read_excel('sales_report.xlsx', sheet_name='Q4')
    print(df.describe())