Laravel Excel wraps PhpSpreadsheet to export collections and queries and import sheets into Eloquent models with chunking and queues.
Overview
Laravel Excel is a Laravel package that simplifies spreadsheet work by wrapping PhpSpreadsheet. Application code defines export and import classes, then the package handles generating Excel or CSV files from collections, queries, or Blade-rendered HTML tables.
Exports can stream large query results with automatic chunking, and both imports and exports can be queued so heavy files process in the background. Imports map workbook rows to Eloquent models using chunk reads and batch inserts to limit memory use.
A companion integration adds Nova actions to download resource listings as spreadsheets with headings. Documentation and learning material cover exports, imports, and Nova usage for teams adopting the package in production apps.
The package targets developers who want spreadsheet IO inside Laravel conventions rather than calling PhpSpreadsheet APIs directly for every project.
Key features
- Export collections and queries to Excel or CSV
- Chunked exports for large datasets
- Queued imports and exports
- Import sheets to Eloquent models
- Export from Blade HTML tables
- Laravel Nova download action
- PhpSpreadsheet-backed read and write
- Batch insert chunk reading on import
Use cases
- Admin CSV exports of user data
- Bulk user or catalog imports
- Reporting downloads from Nova
- Background processing of large spreadsheets
- Custom spreadsheet layouts from Blade