MNB PHPExcelDeveloper Guide

ODS · Large files

ODS large files examples.

Package-local, copy-ready examples organized like the classes and methods reference. Open one example at a time, search by method, and jump from the right-side index.

Packagemnb/mnb-phpexcel-ods:^2.0Reference1 examples · 4 methods
ODS individual library

Large files examples with copy-ready, production-minded PHP.

Every snippet uses mnb/mnb-phpexcel-ods or its declared Core dependency. Each copied snippet includes strict typing, a concise summary, implementation guidance, readable limits, and a safe fixture check.

1
examples
4
documented methods
Example 01

Project and stream large ODS rows

Open related guide
projectColumns()range()streaming()rows()
project-and-stream-large-ods-rows.php
<?php

declare(strict_types=1);

/*
Summary:
    Limit the source range and retain only fields required by the application.

Implementation note:
    ODS may encode repeated rows and cells compactly. Keep repetition and source-size limits enabled
    for untrusted files.
*/

use Mnb\PHPExcel\Format\Ods;

$rows = Ods::read(__DIR__ . '/events.ods')
    ->sheet('Events')
    ->withHeaderRow(1)
    ->projectColumns(['Event ID', 'Type', 'Occurred At'])
    ->range(startRow: 1, endRow: 200_000)
    ->streaming()
    ->rows();