Laravel Excel

Supercharged Excel and CSV exports and imports for Laravel applications

Library
Composer
v4.0.1
12,705stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
95/100Excellent
Development Activity100
Maintenance96
Community84
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
74/100Good
Architecture78
Code Quality76
Innovation70
Learning Curve72

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/FromView export 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/WithBatchInserts import 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

Other

Akaunting

Invoicing Finance

10,070

Open-source online accounting for small businesses and freelancers — invoices, expenses, and reporting without monthly fees or vendor lock-in.

View details
98
Repo Health
73
Technical
63
Dependency
Updated yesterday
PHP
72%
MIT

Bagisto

Analytics · Ecommerce

27,983

Open-source Laravel eCommerce platform for building multi-vendor marketplaces, B2B stores, headless commerce, and AI-powered storefronts.

View details
93
Repo Health
75
Technical
69
Dependency
Built with
PHP72%
Blade22%
Updated today
JavaScript
70%
AGPL 3.0

Fleetbase

Logistics

2,510

Modular open-source logistics and supply chain operating system

View details
91
Repo Health
75
Technical
68
Dependency
Built with
JavaScript70%
PHP10%
Updated today
PHP
57%
Other

Hi.Events

Ecommerce · Scheduling

3,985

Self-hosted event ticketing platform that keeps your attendee data, brand, and revenue completely under your control.

View details
88
Repo Health
84
Technical
67
Dependency
Built with
PHP57%
TypeScript37%
Updated 6 days ago
PHP
51%
MIT

Krayin CRM

Ecommerce · CRM

23,694

Free, open-source Laravel & Vue.js CRM for SMEs and enterprises to manage the complete customer lifecycle.

View details
88
Repo Health
68
Technical
70
Dependency
Built with
PHP51%
Blade46%
Updated yesterday
PHP
61%
Other

OpnForm

Forms Surveys · Marketing

3,609

Build unlimited, embeddable forms with no code — powered by AI, logic rules, and real-time analytics

View details
90
Repo Health
75
Technical
69
Dependency
Built with
PHP61%
Vue31%
Updated yesterday
PHP
45%
AGPL 3.0

solidtime

Productivity · Invoicing Finance

8,860

Modern open-source time tracker for freelancers and agencies with invoicing, multi-org support, and Toggl/Clockify migration built in.

View details
84
Repo Health
81
Technical
70
Dependency
Built with
PHP45%
TypeScript30%
Vue23%
Updated yesterday

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search