MNB PHPExcelDeveloper Guide
Versions

Version 2.0.3 Documentation Notes

Discover and select the active worksheet, check optional sheet names, and test normalized data rows after header and empty-row options.

Updated

Core 2.0.3+XLSX 2.0.3+
Available sincev2.0.3Last API changev2.0.3Version guide
LevelAll levelsReading time7 minPackagemnb/mnb-phpexcel-core and xlsx

What you will learn

  • Use activeSheetName() and activeSheet().
  • Check sheet existence without exceptions.
  • Require normalized data rows.

Sheet discovery and empty checks#

PHP
$workbook = MnbExcel::read($path);

$sheet = $workbook->sheetIfExists('Orders')
    ?? $workbook->activeSheet();

$session = $sheet->withHeaderRow(1);

if ($session->isEmpty()) {
    echo 'No data rows found.';
}

Open sheet utilities and row counts →