Laravel Excel

Supercharged Excel and CSV exports and imports for Laravel applications

Library
Composer
v4.0.3
12,705 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
92 /100 Excellent
Development Activity 88
Maintenance 96
Community 84
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
74 /100 Good
Architecture 78
Code Quality 76
Innovation 70
Learning Curve 72

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

PHP
82%
Other

Akaunting

Invoicing Finance

10,149

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
Built with
PHP 82%
Blade 13%
Updated 5 days ago
PHP
73%
MIT

Bagisto

Analytics · Ecommerce

28,186

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
67
Dependency
Built with
PHP 73%
Blade 21%
Updated 1 weeks ago
JavaScript
69%
AGPL 3.0

Fleetbase

Logistics

3,940

Modular open-source logistics and supply chain operating system

View details
93
Repo Health
75
Technical
68
Dependency
Built with
JavaScript 69%
PHP 11%
Updated 4 days ago
PHP
58%
Other

Hi.Events

Ecommerce · Scheduling

4,037

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

View details
88
Repo Health
84
Technical
66
Dependency
Built with
PHP 58%
TypeScript 36%
Updated 1 weeks ago
PHP
51%
MIT

Krayin CRM

CRM · Ecommerce

23,954

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

View details
90
Repo Health
68
Technical
70
Dependency
Built with
PHP 51%
Blade 43%
Updated 1 weeks ago
PHP
63%
Other

OpnForm

Forms Surveys · Marketing

3,752

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

View details
90
Repo Health
75
Technical
68
Dependency
Built with
PHP 63%
Vue 29%
Updated 1 weeks ago
PHP
46%
AGPL 3.0

solidtime

Invoicing Finance · Productivity

8,933

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
PHP 46%
TypeScript 29%
Vue 22%
Updated 5 days ago

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