Skip to content
MNB PHPExcelDeveloper Guide
AI

Database library

Manifests, Failed Rows, and Database Cursors

Use the format-neutral support classes for durable progress state, failed-row CSV output, and forward-only PDO exports.

Level
Advanced
Reading time
9 min
Package
mnb/mnb-phpexcel-database
Updated
LargeImportManifestLargeFailedRowsCsvWriterLargePdoCursor

Persist resumable progress#

PHP
use Mnb\PHPExcel\Large\LargeImportManifest;

$manifest = new LargeImportManifest(__DIR__ . '/storage/import.json');
$manifest->start([
    'source_path' => $sourcePath,
    'table' => 'orders',
    'status' => 'running',
]);

$manifest->update([
    'chunks_completed' => 4,
    'last_row_number' => 4001,
]);

Keep the integration boundary clear#

Design resumability at the data layer#

  • Use stable unique keys and database constraints.
  • Choose duplicate behavior that safely tolerates replay.
  • Store manifests and failed-row files in private durable storage.
  • Fingerprint the source file and effective configuration.
  • Treat progress callbacks as observability, not authoritative resume state.