cube-agency / filament-excel
Excel exports and imports for Filament 4 and 5, powered by Laravel Excel
Fund package maintenance!
v1.0.0
2026-06-26 10:49 UTC
Requires
- php: ^8.3
- anourvalar/eloquent-serialize: ^1.3
- filament/actions: ^4.0|^5.0
- filament/forms: ^4.0|^5.0
- filament/notifications: ^4.0|^5.0
- filament/support: ^4.0|^5.0
- filament/tables: ^4.0|^5.0
- illuminate/contracts: ^11.28|^12.0|^13.0
- laravel/serializable-closure: ^1.3|^2.0
- maatwebsite/excel: ^3.1.69
- spatie/laravel-package-tools: ^1.15.0
Requires (Dev)
- filament/filament: ^4.0|^5.0
- larastan/larastan: ^3.0
- laravel/pint: ^1.0
- nunomaduro/collision: ^8.0
- orchestra/testbench: ^9.0|^10.0|^11.0
- pestphp/pest: ^3.7|^4.0
- pestphp/pest-plugin-arch: ^3.0|^4.0
- pestphp/pest-plugin-laravel: ^3.0|^4.0
- pestphp/pest-plugin-livewire: ^3.0|^4.0
- rector/rector: ^2.0
README
Excel exports and imports for Filament 4 and 5, powered by Laravel Excel.
Where Filament's native export/import actions stop, this plugin continues:
- Real XLSX styling — cell number formats, column widths, style arrays, bold + frozen headers, raw PhpSpreadsheet access
- Multi-sheet workbooks — each sheet with its own query, columns and styling
- Table-aware exports — zero-config export of the visible columns, respecting filters, search, sort and selection
- Import wizard — file upload, column mapping with auto-guessing, per-row validation
- Failures report — invalid rows are skipped and collected into a downloadable XLSX (original values + error messages), ready to fix and re-upload
- Synchronous by default, queued on demand —
->queued()switches to chunked jobs with database notifications, signed expiring download links and automatic pruning - Raw query support — export from
DB::table()joins and array rows, not just Eloquent
Requirements
- PHP 8.3+
- Laravel 11.28+ / 12 / 13
- Filament 4 or 5
Installation
composer require cube-agency/filament-excel
That's it — no plugin registration needed. Optionally publish the config:
php artisan vendor:publish --tag="filament-excel-config"
For queued exports/imports, enable database notifications in your panel.
Quick start
Export
use CubeAgency\FilamentExcel\Actions\ExcelExportAction; use CubeAgency\FilamentExcel\Actions\ExcelExportBulkAction; use CubeAgency\FilamentExcel\Exports\Columns\Column; $table ->headerActions([ // Zero config: exports visible columns, respecting filters, search and sort ExcelExportAction::make(), // Or configured inline ExcelExportAction::make('styled') ->columns([ Column::make('name')->width(40), Column::make('email')->heading('E-mail'), Column::make('balance')->format('#,##0.00'), ]) ->filename('users'), ]) ->toolbarActions([ ExcelExportBulkAction::make(), // selected rows only ]);
Import
use CubeAgency\FilamentExcel\Actions\ExcelImportAction; use CubeAgency\FilamentExcel\Imports\Columns\ImportColumn; ExcelImportAction::make() ->model(User::class) ->columns([ ImportColumn::make('name')->required(), ImportColumn::make('email')->required()->rules(['email'])->guess(['e-mail']), ])
Users upload a file, map its columns (pre-matched automatically), and invalid rows come back as a downloadable failures report.
Documentation
- Exports — actions, columns, styling, multi-sheet workbooks, queueing, raw queries
- Imports — mapping, validation, custom row handling, failures report
- Configuration — disks, expiry, queues, downloads, pruning
Testing
composer test
Changelog
See CHANGELOG for recent changes.
Credits
- Cube Agency
- Built on Laravel Excel by Spartner
License
MIT. See LICENSE.