Laravel News published this overview on September 22, 2026. It traces Fast Excel from the 2020 coverage of version 2.2, which focused on collection exports, browser downloads, and multi-sheet workbooks. Fast Excel 5 now covers large operational imports, divided queue jobs, sheet selection, column filtering, and safer export values.
<?php
use App\Models\Contact;
use Illuminate\Support\LazyCollection;
use Rap2hpoutre\FastExcel\FastExcel;
(new FastExcel)->importLazy('contacts.xlsx')
->chunk(1_000)
->each(function (LazyCollection $contacts) {
Contact::insert($contacts->all());
});Fast Excel 5 requires PHP 8.0 or later and Laravel 6 or later. The current release supports Laravel 6 through 13 and uses OpenSpout 4. The major-version transition also moved the package from box/spout to openspout/openspout. Projects still running Laravel 5 or PHP 7 with Fast Excel 2 need a separate dependency upgrade plan.
The package remains focused on row-based file processing with low memory use. Version 5.12 introduced importLazy() together with streaming export changes. The method yields rows through Illuminate\Support\LazyCollection, allowing applications to process database batches without keeping the complete upload in memory. The repository contains readme-export-bench.php, which compares generator-based export with export from a materialised collection. The article also connects this approach with large CSV uploads that use manual parsing.
headerRow(), startRow(), and limitRows() support chunked spreadsheet jobs. headerRow() reads field names from the actual heading row. startRow() chooses the first row for a chunk, while limitRows() sets its maximum size. Before Fast Excel 5.17, startRow() also treated the selected row as the headings, so a later chunk could interpret data as field names. headerRow() now separates those positions while preserving the previous startRow() behavior unless the new option is used. PR #418 introduced the method.
Fast Excel 5.16 added sheet() for selecting a sheet by name and onlyColumns() for restricting an import to required fields. The latter accepts column letters or one-based positions, such as A, B, and H. It prevents empty fields caused by formatting far beyond the actual data. limitColumns() covers imports that need every column up to a specified position. The same release allowed an OpenSpout cell instance as an export value. PR #419 added these changes.
The 5.17 release added escapeFormulas() in PR #411. Called before export, it writes values beginning with =, +, -, or @ as text. This protects reports when spreadsheet software might interpret data from uploaded CSV files or user-controlled database fields as formulas. Composer installation uses composer require rap2hpoutre/fast-excel.




Comments
No comments yet — be the first.
Open the discussion
No account or password needed — just enter your e-mail and we’ll send you a one-time sign-in link. First time here? You’re set up automatically.
Your rating will be applied automatically after you sign in.
Check your inbox
We’ve sent a sign-in link to …. Open it on this device — this tab will sign you in automatically.
Nothing arrived? Check your spam folder — and mark the mail as "Not spam" so it lands in your inbox next time.