Skip to content
MNB PHPExcelDeveloper Guide
AI
Standalone XLS package

PHP XLS Library for Reading & Writing Legacy Excel Files

Use the standalone MNB PHPExcel XLS package when your application must read or write legacy Excel 97–2003 .xls workbooks with native BIFF8 and OLE/CFB support.

Composer
composer require mnb/mnb-phpexcel-xls:^2.0
Package
mnb/mnb-phpexcel-xls
Entry API
Mnb\PHPExcel\Format\Xls
Runtime
PHP 8.1+
Format
.xls · Excel 97–2003

Choose your XLS workflow#

Use the right XLS API#

TaskPrimary APIChoose it when
Read normalized rowsXls::read()You want the package-local facade with headers, sheet selection, row iteration, arrays, and normalized reader options.
List or inspect worksheetsXlsReader::sheetNames()You need workbook structure before choosing which worksheet to process.
Iterate a worksheet directlyXlsReader::iterateSheet()You need direct native BIFF8 iteration without building a higher-level facade workflow first.
Write a straightforward workbookXls::write()Associative rows and normal writer options are enough for a legacy .xls export.
Write from workbook dataWorkbookData + XlsWriterYou already have an explicit workbook model and need the native XLS writer directly.

What the standalone XLS package covers#

Read

Native BIFF8 workbook data

  • OLE/CFB compound-file containers
  • Worksheet selection and normalized rows
  • Shared strings, dates, formats and cached formula values
  • Sheet names, ranges and binary-parser safeguards
Write

Legacy Excel output

  • Excel 97–2003 .xls workbooks
  • Rows, cells, formulas, merges and dimensions
  • Workbook metadata and supported pane/layout settings
  • Package-local facade or direct native writer APIs
Compatibility

Use XLS deliberately

  • Best for integrations that explicitly require .xls
  • Native implementation without PhpSpreadsheet
  • Legacy BIFF8 format limits still apply
  • Prefer XLSX for modern workbook features and larger sheets

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