MNB PHPExcelDeveloper Guide
Samples

Download Sample Excel Workbooks

Use small, reproducible XLSX fixtures for reading, writing, formulas, multiple sheets, large-file streaming, and invalid-import examples.

Updated

Downloadable fixturesXLSXFull packageIndividual XLSX
Available sincev2.0.5Last API changev2.0.5Version guide
LevelAll levelsReading time5 minPackagemnb/mnb-phpexcel or mnb/mnb-phpexcel-xlsx

What you will learn

  • Run documentation examples against known workbook structures.
  • Reproduce row, sheet, formula, validation, and large-file behavior.
  • Separate library setup problems from source-workbook problems.

Choose a workbook#

customers.xlsx

Customers

First read, headers, booleans, dates, arrays, and columns.

Sheets
Customers
Size
4 data rows
Download
multiple-sheets.xlsx

Multiple worksheets

Sheet discovery, active-sheet helpers, named selection, and worksheet fallback.

Sheets
Orders, Customers, Summary
Size
3 worksheets
Download
sales-report.xlsx

Sales report

Dates, formulas, summary sheets, numeric values, and report inspection.

Sheets
Sales, Summary
Size
4 orders
Download
formulas-and-styles.xlsx

Formulas and styles

Formula cells, cached values, merged headings, number formats, and styles.

Sheets
Invoice
Size
4 line items
Download
invalid-import.xlsx

Invalid product import

Missing values, negative prices, invalid quantities, bad email, duplicate SKU, and unknown status.

Sheets
Products
Size
7 source rows
Download
large-orders.xlsx

Large-order fixture

Streaming, chunking, progress, limits, projection, and memory measurements.

Sheets
Orders
Size
500 data rows
Download

Copy a fixture into your project#

Project layout
my-project/
├── vendor/
├── examples/
│   └── read-customers.php
└── storage/
    └── samples/
        └── customers.xlsx
examples/read-customers.php
<?php

declare(strict_types=1);

require __DIR__ . '/../vendor/autoload.php';

use Mnb\PHPExcel\MnbExcel;

$path = __DIR__ . '/../storage/samples/customers.xlsx';

$rows = MnbExcel::read($path)
    ->sheet('Customers')
    ->withHeaderRow(1)
    ->toArray();

print_r($rows);

Use fixtures as tests, not production templates#

Checksums for every fixture are included in sample-workbook-checksums.txt.