
Laravel Excel
A Laravel wrapper around PhpSpreadsheet for exporting and importing Excel and CSV files.
- Stars
- 12.7k
- Forks
- 2k
- Licence
- MIT
- Language
- PHP
- Last update
- 14 days ago
- Type
- Library
What it is
Laravel Excel is a PHP package for Laravel applications that makes it easier to export data to Excel or CSV files and import spreadsheets into the app. It wraps the PhpSpreadsheet library so developers can work with collections, database queries, and Blade views without handling the low-level spreadsheet code. Large exports and imports can be split into chunks and queued to run in the background.
- Export an Eloquent query to an Excel or CSV download, with chunking for large result sets
- Queue a large export so it runs in the background
- Import a workbook into Eloquent models using chunk reading and batch inserts
- Render a Blade view containing an HTML table and export it to Excel
Great for
- Laravel developers who need to export database query results to Excel or CSV
- Teams importing spreadsheet data from users into Eloquent models
- Projects that need large exports or imports processed in background queues
- Developers who want to export a styled HTML table from a Blade view to a spreadsheet
Not ideal for
- Non-PHP projects, since it is a Laravel package and requires Laravel
- Users who need a standalone spreadsheet editor rather than code to generate files
- Projects needing a version that is still actively supported: the README lists version 3.1 as CVE-only and version 4.0 as the one receiving new features, so check the version table against your Laravel and PHP versions before adopting
- Commercial projects that want no attribution obligations, since the README says the package is MIT licensed but also Postcardware, asking users who run it in production to send a postcard
How to get it
- 1
Install with a package manager
You'll need: PHP and Laravel (exact versions per the README support table)
Clone the repository
git clone https://github.com/SpartnerNL/Laravel-Excel - 2
Run it
- Install the package into a Laravel project using the instructions in the official documentation at docs.laravel-excel.com
- Create an export class or use the quickstart example from the documentation
- Run the export from a controller or route to generate an Excel or CSV file
- Try a simple import into a model to confirm the setup works
- 3
Get the most out of it
- Use queued exports and imports for large files so processing runs in the background
- Use chunk reading and batch inserts when importing large workbooks
- Export Blade views with HTML tables when you need custom spreadsheet layouts
- Check the official documentation and video course for detailed guides
Downloads
Strengths
- Built on PhpSpreadsheet, a widely used PHP spreadsheet library, and designed to fit Laravel conventions
- Supports chunked reading, batch inserts, and queued jobs for larger files
- Has a large user base, with about 12,700 GitHub stars and an MIT license for the code
Trade-offs
- Tied to Laravel and PHP; the version table lists specific supported Laravel and PHP ranges that you must match
- The README describes a Postcardware request for production use, which is a social expectation rather than a fee, but it is still a condition to read
- Installation commands and detailed setup are not in the truncated README, so you will need to consult the external documentation
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| Laravel-Excel (this) | 12.7k | Library | intermediate | 14 days ago | Laravel developers who need to export database query results to Excel or CSV |
| PhpSpreadsheet | 14k | Library | intermediate | 4 days ago | PHP developers who need to generate or import spreadsheet files from a web app or script |
| bagisto | 28.3k | App | intermediate | 4 days ago | Developers building a custom online store on Laravel |
| laravel-crm | 24.1k | App | intermediate | 4 days ago | Small and mid-sized businesses that want a self-hosted CRM |
| laravel-permission | 13k | Library | intermediate | 15 days ago | Laravel developers who need role-based access control in an app |
| jwt-auth | 11.5k | Library | intermediate | 13 days ago | Laravel developers building token-based APIs |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.