Search by

mnb / mnb-phpexcel-database-xlsx

mnagendrababu23

Large XLSX-to-database streaming integration for MNB PHPExcel.

v2.0.0 2026-07-29 09:29 UTC

This package is auto-updated.

Last update: 2026-09-01 18:18:03 UTC


README

Optional integration package for importing very large XLSX worksheets into PDO databases without loading the full worksheet into memory.

MNB PHPExcel Assistant

Generate MNB PHPExcel code using our dedicated ChatGPT assistant:

Open MNB PHPExcel AI Assistant

composer require mnb/mnb-phpexcel-database-xlsx:^2.0

This package intentionally combines three independent modules:

  • mnb/mnb-phpexcel-xlsx for native XLSX streaming
  • mnb/mnb-phpexcel-database for validation and PDO insertion
  • mnb/mnb-phpexcel-core for shared contracts and row processing

Direct API

use Mnb\PHPExcel\Large\LargeExcelDatabaseImportEngine;

$result = (new LargeExcelDatabaseImportEngine())->importToSql(
    __DIR__ . '/data/import.xlsx',
    $pdo,
    'customers',
    [
        'sheet' => 'Customers',
        'with_header' => true,
        'chunk_size' => 1000,
        'batch_size' => 500,
        'resume' => true,
    ]
);

Install mnb/mnb-phpexcel-database alone when XLSX-specific streaming imports are not required.