What Is a XLSX File? Structure, Uses and Limits

November 08, 2026 · XLSX.now Editorial · XLSX Essentials

Understand what XLSX stores, how to identify it and when it is the right format.

Internal Anatomy of an XLSX Archive

An XLSX file is a ZIP archive conforming to the Office Open XML (OOXML) packaging conventions. Rename any .xlsx file to .zip and extract it to inspect the following mandatory and optional parts:

Required Package Components

[Content_Types].xml

Maps every part in the archive to a MIME type. The workbook part uses application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml. A missing or malformed content types declaration prevents any compliant application from opening the file.

_rels/.rels

The package-level relationship file. It must contain a relationship of type http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument pointing to xl/workbook.xml. Without this, the consuming application cannot locate the workbook root.

xl/workbook.xml

The entry point for spreadsheet data. It enumerates sheets by name, sheet ID, and relationship ID (r:id), each pointing to a worksheet part. It also defines workbook-level properties such as date 1904 mode and calculation chain references.

xl/worksheets/sheet1.xml (and subsequent sheet parts) Each worksheet contains row and cell elements. Cells store either inline values or references to the shared strings table. Sheet parts also hold column width definitions, row height overrides, merged cell ranges, and data validation rules.

Supporting Parts

xl/sharedStrings.xml

A string table where each unique text value appears exactly once. Cells containing strings store a zero-based index into this table rather than the text itself. This deduplication reduces file size in workbooks with repeated labels, headers, or categorical data.

xl/styles.xml

A style sheet part containing four indexed collections: number formats, fonts, fills, and borders. Cell formats reference these collections through a cell style index. The part also defines differential formatting records used by conditional formatting rules.

xl/theme/theme1.xml

A DrawingML theme specifying the color scheme (12 accent colors, hyperlink colors, light/dark variants), font scheme, and format scheme applied to charts, tables, and cell styles.

docProps/core.xml and docProps/app.xml Dublin Core metadata (creator, title, subject, modification date) and application-specific properties (application name, version, company). These parts are optional for structural validity but present in all Excel-generated files.

Observable Validation Checks

To confirm a file is a structurally valid XLSX without relying on extension or MIME type, perform these checks in sequence:

  1. ZIP header verification: Read the first four bytes. They must be 50 4B 03 04. This confirms the file is a ZIP archive, not a renamed binary XLS or an unrelated format.

  2. Content types presence: Extract the archive and verify that [Content_Types].xml exists at the root. The file must contain a <Default> or <Override> element mapping the .xml extension or the workbook part to a spreadsheet-specific MIME type.

  3. Workbook relationship: Open _rels/.rels and confirm it contains a <Relationship> element with Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" and a Target attribute pointing to xl/workbook.xml.

  4. Workbook part validity: Open xl/workbook.xml and verify it contains a <workbook> root element in the http://schemas.openxmlformats.org/spreadsheetml/2006/main namespace with at least one <sheet> child element.

  5. Sheet part linkage: For each <sheet> element in xl/workbook.xml, locate the corresponding relationship in xl/_rels/workbook.xml.rels and confirm the target worksheet file exists in the archive.

A file failing any of checks 1–4 is not a valid XLSX. Failure at check 5 indicates a corrupted or incomplete archive.

Hard Specification Limits

The following limits are defined in the OOXML specification and enforced by Microsoft Excel. Exceeding them produces a file that either fails to open or triggers repair-mode recovery.

Constraint Limit
Rows per worksheet 1,048,576 (2^20)
Columns per worksheet 16,384 (2^14, column XFD)
Characters per cell 32,767 (stored in <is><t> or shared strings)
Unique cell styles (cellXfs) 65,530
Unique shared string entries Specification allows more; Excel caps at 1,048,576
Worksheets per workbook 255 (Excel 2007); 1,024 (Excel 2010 and later)
Formula nesting depth 64 levels
Defined names per workbook 65,533
Characters in a defined name 255
Data validation rules per worksheet 65,533

Practical Constraints Observed in Production

  • File size: Excel may refuse to open files exceeding approximately 500 MB uncompressed. The ZIP64 extension is supported, but memory pressure during XML parsing is the real bottleneck.
  • Character encoding: All XML parts must declare UTF-8 or UTF-16 encoding. Non-BMP characters (Unicode supplementary planes, including many emoji and CJK Unified Ideographs Extension B) are valid in XML 1.0 only when encoded as surrogate pairs in UTF-16 or as numeric character references in UTF-8.
  • Custom XML parts: Arbitrary XML can be stored in the archive (typically under xl/customXml/), but Excel ignores parts not declared in [Content_Types].xml and not referenced through the relationship graph. Data stored this way survives round-trips through Excel but is invisible to the user interface.

When XLSX Is the Correct Format

Appropriate Use Cases

Formatted tabular data within row and column limits

Financial models, budget forecasts, scientific measurement logs, and business reports that require number formatting, cell borders, conditional formatting, and merged regions.

Workbooks with charts and PivotTables

Chart definitions reside in xl/charts/ as DrawingML parts. PivotTable definitions, including cache sources and field mappings, reside in xl/pivotTables/ and xl/pivotCache/. Both are first-class parts in the OOXML schema.

Cross-application interchange

Google Sheets, LibreOffice Calc, and Apple Numbers can all read and write XLSX. Feature fidelity varies: array formulas, data validation with custom formulas, and advanced conditional formatting rules may degrade or be silently dropped by non-Excel applications. Test round-trip fidelity with representative data before committing to XLSX as an interchange format.

Programmatic generation and parsing

Libraries such as openpyxl (Python), XLSXWriter (Python, write-only), ClosedXML (.NET), and Apache POI (Java) implement the OOXML spreadsheet schema. These libraries can produce spec-compliant XLSX without Excel installed.

Inappropriate Use Cases

Concurrent multi-user editing

XLSX has no merge-conflict resolution, change tracking at the cell level, or operational transformation layer. Simultaneous saves from different users overwrite each other. Use Excel Online with co-authoring, Google Sheets, or a database-backed application for collaborative workflows.

Datasets exceeding 500 MB uncompressed

XML parsing of large worksheet parts consumes disproportionate memory. For bulk data storage or transfer, use columnar formats (Parquet, ORC), delimited text (CSV, TSV), or a database dump.

Macro-enabled workbooks

XLSX cannot contain VBA projects, Excel 4.0 macro sheets, or add-in references. Use XLSM for VBA macros or XLAM for add-ins. An XLSX file containing a vbaProject.bin part violates the specification and triggers a security warning in Excel.

Embedded video or audio

The OOXML spreadsheet schema does not define parts for embedded multimedia. Images stored in xl/media/ are supported through the drawing layer. Attempts to embed video or audio rely on application-specific extensions and will not survive round-trips through other spreadsheet applications.

Reference for what is xlsx complete format guide

Microsoft Open Specifications: [MS-XLSX] Office Open XML Spreadsheet Document Format https://learn.microsoft.com/en-us/openspecs/office_standards/ms-xlsx/