Skip to content
MNB PHPExcelDeveloper Guide
AI

Versions

Version 2.0.4 Documentation Notes

Render MNB exceptions without raw vendor paths and use nullable or active-sheet fallback helpers when worksheet input is optional.

Level
All levels
Reading time
6 min
Package
mnb/mnb-phpexcel-core
Updated
Core 2.0.4+Error rendering
Available sincev2.0.4Last API changev2.0.4Version guide
Release context

v2.0.4 in the MNB PHPExcel v2 release line.

Developer-friendly error rendering and active-sheet fallback helpers improve diagnostics and optional worksheet handling.

Status
Maintenance
Package
mnb/mnb-phpexcel-core
Introduced
v2.0.4
Error handling

Keep developer diagnostics useful without exposing raw vendor paths to public responses.

v2.0.4 adds developer-friendly rendering and supports optional worksheet selection with an active-sheet fallback.

Development setup
PHP
use Mnb\PHPExcel\Support\MnbExcelErrorHandler;

MnbExcelErrorHandler::registerDeveloperMode();

$sheet = $workbook->sheetOrActive($optionalSheetName);
01Developer mode

Register the MNB error renderer where detailed diagnostics are appropriate.

02Public output

Keep application-facing responses clean rather than exposing uncaught fatal output.

03Optional sheet input

sheetOrActive() gives optional names a deliberate active-sheet fallback.

Operational guidance

Treat diagnostics and application error handling as separate boundaries.

The errors-and-results concept guide shows the broader production pattern around exceptions, row-level failures, and terminal results.

Errors and resultsUse the concept guide for production-safe boundaries and result contracts.
Open errors and results →