XLSX example reference
Standalone XLSX examples for modern Excel workbooks.
Read, inspect, stream, write, and protect .xlsx files through the package-local Xlsx facade and the shared Core read session.
XLSX examples
Read, inspect, stream, write, and protect .xlsx files through the package-local Xlsx facade and the shared Core read session.
composer require mnb/mnb-phpexcel-xlsx:^2.0Open an XLSX workbook, select a worksheet, map row one to associative keys, and collect bounded rows.
Create a read session with typed options, inspect the effective configuration, and switch between normal and streaming modes.
Use the focused static shortcut when the application needs a single cell rather than a reusable read session.
Return a rectangular cell range from one worksheet through the standalone XLSX facade.
Inspect formula, cached value, comments, hyperlinks, number format, and rich-text runs for selected XLSX cells.
Read drawing metadata and worksheet protection settings without first collecting tabular rows.
Detect password-to-open encryption and report the Office encryption mode before creating a read session.
Inspect package status, file size, encryption, worksheet dimensions, warnings, and validation errors without materializing rows.
Discover sheet names first, then select a required worksheet by name or one-based index.
Read the workbook active-sheet name, one-based index, and complete active-sheet metadata.
Check a worksheet name or one-based index without selecting it or throwing for a missing optional sheet.
Return a selected read session when a sheet exists and null when an optional worksheet is absent.
Use the active worksheet only when the requested value is null or empty while keeping non-empty typos strict.
Create a read session targeting the workbook active worksheet through either supported fluent method.
Find one worksheet in inspection metadata and read dimensions, hidden rows and columns, merges, filters, and drawing flags.
List worksheets and count normalized data rows for each one without building complete PHP arrays.
Inspect a messy worksheet, report the likely header row and confidence, then apply semantic header detection.
Compare physical-row, data-row, first-non-empty, enabled, and disabled header mappings on cloned read sessions.
Constrain the source range, project worksheet columns before parsing, and select normalized header keys afterward.
Check whether normalized data exists and enforce a required-row contract before terminal conversion.
Preview the first normalized row, count the selection, inspect row-state metadata, and iterate records lazily.
Process bounded batches, report progress, choose a row-error policy, and inspect normalized row errors.
Reuse one selected worksheet for direct cells, multiple coordinates, rectangular ranges, and calculated formula values.
Read a typed cell snapshot, one cell style, a range of styles, and rich-text runs from the selected worksheet.
Inspect worksheet drawing metadata or extract embedded images to a controlled destination directory.
Read worksheet-level metadata and editing-protection settings from one selected XLSX sheet.
Return structured payloads for the selected sheet, the complete workbook, or an automatically selected scope.
Convert normal or structured read results to JSON/XML strings or save them directly to application-owned files.