Skip to content
MNB PHPExcelDeveloper Guide
AI
Standalone Database + XLSX bridge

PHP XLSX-to-PDO Import Library for Large Database Workflows

Use the standalone Database + XLSX bridge when a job specifically needs native large-file XLSX streaming coordinated directly with PDO validation, mapping, chunked database writes, resume manifests, and failed-row output.

Composer
composer require mnb/mnb-phpexcel-database-xlsx:^2.0
Package
mnb/mnb-phpexcel-database-xlsx
Entry API
Mnb\PHPExcel\Large\LargeExcelDatabaseImportEngine
Runtime
PHP 8.1+
Format
.xlsx → PDO

Choose your Database XLSX workflow#

Use the right Database XLSX API#

TaskPrimary APIChoose it when
Import one XLSX sheet to a tableLargeExcelDatabaseImportEngine::importToSql()A large worksheet should stream through validation and mapping into one PDO table with bounded memory.
Import multiple sheets to tablesimportWorkbookToSql()A workbook contains several logical datasets that map to separate database tables.
Resume after interruptionmanifest_path + resumeChunk progress must survive worker restarts or long-running import interruptions.
Import rows that are already iterableSqlImporter::importRows()Use the Database package alone when XLSX parsing and chunk orchestration are not part of this service boundary.

What the Database XLSX bridge covers#

XLSX

Native large-file worksheet streaming

  • Focused XLSX reader and row normalization
  • Worksheet selection and chunk delivery
  • Bounded-memory processing for large sources
  • Physical source-row numbers preserved downstream
Database

PDO validation and writes

  • Mapping, validation and normalization
  • Prepared SQL batches and transaction controls
  • Duplicate strategies and unique business keys
  • Failed-row output for correction and replay
Bridge

Resume-aware orchestration

  • Independent chunk and SQL batch sizes
  • Progress callbacks and persisted manifests
  • Single-sheet and workbook-to-table workflows
  • Replay-safe resume behavior for long jobs

Package boundary: mnb/mnb-phpexcel-database-xlsx coordinates Core, XLSX, and Database for direct large-XLSX-to-PDO workflows. Use mnb/mnb-phpexcel-database alone when your application already has iterable rows and does not need XLSX chunk orchestration.