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+
What you will learn
- Use activeSheetName() and activeSheet().
- Check sheet existence without exceptions.
- Require normalized data rows.
Sheet discovery and empty checks#
$workbook = MnbExcel::read($path);
$sheet = $workbook->sheetIfExists('Orders')
?? $workbook->activeSheet();
$session = $sheet->withHeaderRow(1);
if ($session->isEmpty()) {
echo 'No data rows found.';
}Was this guide useful?Use GitHub issues for corrections, missing examples, or unclear behavior.
Open an issue