Resume, Progress, and Failed Rows
Persist large XLSX import checkpoints, resume safely, report invalid source rows, and design idempotent replay behavior.
Updated
LargeImportManifestLargeFailedRowsCsvWriterprogressWhat you will learn
- Resume from the last committed source row.
- Keep invalid rows available for correction and re-upload.
- Prevent duplicate data when a chunk is replayed.
Make replay safe#
- Create a stable database unique index for the business key.
- Use
duplicate_strategy=skiporupdatewhen replay is possible. - Keep the source workbook unchanged while its manifest remains active.
- Store the manifest and failed-row CSV outside the public web root.
- Delete or archive the manifest only after the import is conclusively complete.
Use progress as observability#
$result = $engine->importToSql($path, $pdo, 'orders', [
'progress' => static function (array $state): void {
printf(
"Rows: %d | Inserted: %d | Failed: %d\n",
$state['rows_scanned'] ?? 0,
$state['inserted_rows'] ?? 0,
$state['failed_rows'] ?? 0,
);
},
]);Preserve original row numbers#
The integration keeps physical worksheet row numbers in validation and failed-row output so uploaders can correct the exact row in the source workbook.
Was this guide useful?Use GitHub issues for corrections, missing examples, or unclear behavior.
Open an issue