Skip to content
MNB PHPExcelDeveloper Guide
AI
Standalone XLSX package

PHP XLSX Library for Reading, Writing & Large Files

Use the standalone MNB PHPExcel XLSX package when your application owns modern Excel .xlsx files and needs native reading, writing, streaming, inspection, formulas, styles, security, or bounded-memory processing.

Composer
composer require mnb/mnb-phpexcel-xlsx:^2.0
Package
mnb/mnb-phpexcel-xlsx
Entry API
Mnb\PHPExcel\Format\Xlsx
Runtime
PHP 8.1+
Format
.xlsx · Excel 2007+

Choose your XLSX workflow#

Use the right XLSX API#

TaskPrimary APIChoose it when
Read normalized rowsXlsx::read()You need headers, projection, ranges, chunks, validation, or structured output.
Read a cell or rangeXlsx::cell() / Xlsx::rangeValues()The workbook behaves like a lookup document and you do not need a row session.
Inspect before reading rowsXlsx::read(...)->inspect() / sheetNames()You need sheet names, dimensions, warnings, or an upload preview first.
Write a straightforward workbookXlsx::write()Associative rows and normal writer options cover the output.
Build a rich workbookWorkbookData + XlsxWriterYou need explicit styles, charts, pivots, validation, images, comments, or protection definitions.
Process very large XLSX filesLargeXlsxReadSessionBounded memory, progress callbacks, resume checkpoints, or database ingestion matters.

What the standalone XLSX package covers#

Read

Workbook data and metadata

  • Sheets, headers, ranges and projected columns
  • Formulas, dates and number formats
  • Comments, hyperlinks, images and protection metadata
  • Lightweight sheet names, dimensions and inspection
Write

Reports and workbook features

  • Rows, styles and number formats
  • Validation, conditional formatting and freeze panes
  • Charts, pivot definitions, images and comments
  • Workbook/worksheet protection and password encryption
Scale & security

Production XLSX workflows

  • Forward-only and bounded-memory reading
  • Shared-string strategies and preflight analysis
  • Progress callbacks, row errors and compatibility checks
  • Standard and Agile encrypted XLSX handling

Package boundary: this guide uses Mnb\PHPExcel\Format\Xlsx from mnb/mnb-phpexcel-xlsx. Install the focused XLSX library or the monolithic mnb/mnb-phpexcel package for a project, not both.