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.
Core 2.0.3+XLSX 2.0.3+
Release context
v2.0.3 in the MNB PHPExcel v2 release line.
Active-sheet discovery, safe optional sheet selection, and normalized row-state helpers enter the v2 maintenance line.
- Status
- Maintenance
- Package
mnb/mnb-phpexcel-core and xlsx- Introduced
- v2.0.3
Sheet utilities
Discover a worksheet safely, then test normalized data instead of raw workbook structure.
v2.0.3 adds active-sheet discovery, optional sheet lookup, and row-state helpers that operate after header and empty-row rules are applied.
Safe worksheet selection
$workbook = MnbExcel::read($path);
$sheet = $workbook->sheetIfExists('Orders')
?? $workbook->activeSheet();
$session = $sheet->withHeaderRow(1);
if ($session->isEmpty()) {
echo 'No data rows found.';
}activeSheetName()- Discover the workbook active-sheet name.
sheetIfExists()- Check optional worksheet input without forcing an exception.
isEmpty()- Test whether normalized data rows remain after session options.
hasRows()- Use the positive row-presence check when that reads more naturally in application logic.
Continue reading
Use the row-count guide for complete selection and normalized-row behavior.
The detailed reading guide covers active sheets, explicit sheet names, headers, and row-count semantics together.
Was this guide useful?Use GitHub issues for corrections, missing examples, or unclear behavior.
Open an issue