MNB PHPExcelDeveloper Guide
ODS module

ODS Module

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

Updated

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

What you will learn

  • Install the native ODS reader module.
  • 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:^2.0

ZIP and XMLReader support are required by the current native ODS reader implementation.

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 module