MNB PHPExcelDeveloper Guide
ODS library

Standalone ODS Library

Read OpenDocument Spreadsheet files with a native forward-only reader, sheet selection, projection, formulas, and dates.

Updated

LevelAll levelsReading time6 minPackagemnb/mnb-phpexcel-ods
Ods::read()sheetNames()rows()

What you will learn

  • Install the standalone native ODS reader library.
  • Select sheets and stream repeated ODS rows and cells safely.
  • Understand that this package is read-only in the current release.

Install ODS support#

Terminal
composer require mnb/mnb-phpexcel-ods:^2.0

The package requires ext-libxml and ext-zlib. Native ext-zip and ext-xmlreader are recommended for the fastest streaming path; Core provides portable fallbacks.

Read a worksheet#

PHP
use Mnb\PHPExcel\Format\Ods;

$rows = Ods::read('inventory.ods')
    ->sheet('Inventory')
    ->withHeaderRow(1)
    ->streaming()
    ->rows();

Current scope#

CapabilityStatus
Read sheets and rowsSupported
Column projection and row slicingSupported
Formulas and cached valuesSupported
Dates and typed scalar valuesSupported
Write ODSNot in this library