Laravel Excel
Supercharged Excel and CSV exports and imports for Laravel applications
Repository Health
Technical Analysis
Laravel Excel is a Laravel-native wrapper around PhpSpreadsheet that turns exporting and importing spreadsheets into a first-class, Eloquent-friendly workflow. Instead of hand-rolling PhpSpreadsheet calls, you define export/import classes that describe what data to output or how to map incoming rows to models, and the package handles the file generation, streaming, and reading.
For large datasets it adds queued exports/imports, chunked reading, and batched inserts so multi-hundred-thousand-row spreadsheets can be processed in the background without exhausting memory or timing out a request, and it can export a Blade view’s rendered HTML table directly to a spreadsheet for custom layouts.
What You Get
FromCollection/FromQuery/FromViewexport contracts for turning data or a Blade view into an Excel/CSV file- Queued and chunked exports so large datasets are generated in the background without memory exhaustion
ToModel/WithChunkReading/WithBatchInsertsimport contracts for mapping spreadsheet rows to Eloquent models efficiently- Multi-sheet workbook support via
WithMultipleSheets - Facade and dependency-injectable API (
Excel::download,Excel::import) integrated with Laravel’s service container - Validation, heading-row, and caching concerns for cleaning and mapping imported data
Common Use Cases
- Letting admin users download a filtered report of database records as an Excel or CSV file
- Bulk-importing a customer- or vendor-supplied spreadsheet into application records with per-row validation
- Queuing a very large export (hundreds of thousands of rows) so it doesn’t block a web request
- Exporting a styled Blade-rendered HTML table directly as a formatted spreadsheet
Under The Hood
Architecture - The package layers Laravel-specific concerns (src/Concerns, src/Imports, src/Facades) over PhpSpreadsheet: export/import classes implement small marker interfaces (FromCollection, ToModel, WithChunkReading, etc.) that the core Excel facade/service inspects via src/Mixins and src/Files to decide how to stream, chunk, or queue the operation, with background processing handled through src/Jobs and progress/events in src/Events. Tech Stack - Plain PHP (99.96% of the codebase) built on phpoffice/phpspreadsheet for the actual spreadsheet reading/writing, illuminate/support for Laravel container/collection integration across Laravel 5.8 through 13.x, psr/simple-cache for caching, and composer/semver for version constraint handling; requires PHP 7 or 8. Code Quality - Tests under tests/ cover concerns, validators, mixins, cache, and helpers using Orchestra Testbench to boot a Laravel app in isolation, alongside predis/predis and laravel/scout dev dependencies for testing cache and search integrations; the project has run since 2013 with 1,600+ commits and 236 contributors. API Design - The class-based, interface-driven API (implement FromCollection or ToModel on a plain PHP class, then call Excel::download()/Excel::import()) keeps export/import logic testable and decoupled from controllers, and the interface names read as self-documenting contracts, though the breadth of optional concerns (queueing, chunking, batching, multi-sheet) means new users need the docs site to discover which combination applies to their use case.
Used by 7 apps in this directory
Akaunting
Invoicing Finance
Open-source online accounting for small businesses and freelancers — invoices, expenses, and reporting without monthly fees or vendor lock-in.
Bagisto
Analytics · Ecommerce
Open-source Laravel eCommerce platform for building multi-vendor marketplaces, B2B stores, headless commerce, and AI-powered storefronts.
Fleetbase
Logistics
Modular open-source logistics and supply chain operating system
Hi.Events
Ecommerce · Scheduling
Self-hosted event ticketing platform that keeps your attendee data, brand, and revenue completely under your control.
Krayin CRM
Ecommerce · CRM
Free, open-source Laravel & Vue.js CRM for SMEs and enterprises to manage the complete customer lifecycle.
OpnForm
Forms Surveys · Marketing
Build unlimited, embeddable forms with no code — powered by AI, logic rules, and real-time analytics
solidtime
Productivity · Invoicing Finance
Modern open-source time tracker for freelancers and agencies with invoicing, multi-org support, and Toggl/Clockify migration built in.