PHPackages                             jeffersongoncalves/filament-action-export - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. jeffersongoncalves/filament-action-export

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

jeffersongoncalves/filament-action-export
=========================================

Export Filament tables to CSV, XLSX and PDF with preview and print support.

v3.6.12(3mo ago)5169MITPHPPHP ^8.2CI passing

Since Mar 6Pushed 4d agoCompare

[ Source](https://github.com/jeffersongoncalves/filament-action-export)[ Packagist](https://packagist.org/packages/jeffersongoncalves/filament-action-export)[ GitHub Sponsors](https://github.com/jeffersongoncalves)[ RSS](/packages/jeffersongoncalves-filament-action-export/feed)WikiDiscussions 3.x Synced 3w ago

READMEChangelog (10)Dependencies (9)Versions (61)Used By (0)

[![Filament Action Export](https://raw.githubusercontent.com/jeffersongoncalves/filament-action-export/3.x/art/jeffersongoncalves-filament-action-export.png)](https://raw.githubusercontent.com/jeffersongoncalves/filament-action-export/3.x/art/jeffersongoncalves-filament-action-export.png)

Filament Action Export
======================

[](#filament-action-export)

[![Latest Version on Packagist](https://camo.githubusercontent.com/343afccc1959d6d6de3138fd7a1ba5265bc45a3f2c5d4ad35a0225167b43d344/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6566666572736f6e676f6e63616c7665732f66696c616d656e742d616374696f6e2d6578706f72742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jeffersongoncalves/filament-action-export)[![GitHub Tests Action Status](https://camo.githubusercontent.com/7c7702b4a25ad4ee5fdbb8218e094b76991304012de0e17b776778d21d61099e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a6566666572736f6e676f6e63616c7665732f66696c616d656e742d616374696f6e2d6578706f72742f74657374732e796d6c3f6272616e63683d332e78266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/jeffersongoncalves/filament-action-export/actions?query=workflow%3Atests+branch%3A3.x)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/3efb556ce817d81d6d93b2b645f28de5291f479a80122b5a8e43415fee4558da/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a6566666572736f6e676f6e63616c7665732f66696c616d656e742d616374696f6e2d6578706f72742f70696e742e796d6c3f6272616e63683d332e78266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/jeffersongoncalves/filament-action-export/actions?query=workflow%3A%22Fix+PHP+code+styling%22+branch%3A3.x)[![Total Downloads](https://camo.githubusercontent.com/84c01961b56bdbc374dfb21567f9b11962a6c559fbd4f0c1d4c967c1417eb26b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6566666572736f6e676f6e63616c7665732f66696c616d656e742d616374696f6e2d6578706f72742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jeffersongoncalves/filament-action-export)[![License](https://camo.githubusercontent.com/44a0f24b0c22369031f22f74a43708019e80016502f803943875a7bb438fc844/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6a6566666572736f6e676f6e63616c7665732f66696c616d656e742d616374696f6e2d6578706f72742e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

Export Filament tables to **CSV**, **XLSX** and **PDF** with preview, print support, and full customization.

Compatibility
-------------

[](#compatibility)

Package VersionFilament VersionPHP[1.x](https://github.com/jeffersongoncalves/filament-action-export/tree/1.x)3.x^8.1[2.x](https://github.com/jeffersongoncalves/filament-action-export/tree/2.x)4.x^8.2[3.x](https://github.com/jeffersongoncalves/filament-action-export/tree/3.x)5.x^8.2Installation
------------

[](#installation)

```
composer require jeffersongoncalves/filament-action-export "^3.0"
```

### Publish config (optional)

[](#publish-config-optional)

```
php artisan vendor:publish --tag=filament-action-export-config
```

### Publish views (optional)

[](#publish-views-optional)

```
php artisan vendor:publish --tag=filament-action-export-views
```

### Publish translations (optional)

[](#publish-translations-optional)

```
php artisan vendor:publish --tag=filament-action-export-lang
```

Usage
-----

[](#usage)

### Bulk Action

[](#bulk-action)

Add the export action to your table's bulk actions to allow users to export selected records:

```
use JeffersonGoncalves\FilamentExportAction\Actions\FilamentExportBulkAction;
use JeffersonGoncalves\FilamentExportAction\Enums\ExportFormat;
use JeffersonGoncalves\FilamentExportAction\ValueObjects\AdditionalColumn;

public function table(Table $table): Table
{
    return $table
        ->columns([
            TextColumn::make('name'),
            TextColumn::make('email'),
        ])
        ->bulkActions([
            FilamentExportBulkAction::make('export')
                ->formats([ExportFormat::Csv, ExportFormat::Xlsx, ExportFormat::Pdf])
                ->defaultFormat(ExportFormat::Xlsx)
                ->excludeColumns(['password', 'remember_token'])
                ->additionalColumns([
                    AdditionalColumn::make('exported_at')
                        ->defaultValue(now()->format('d/m/Y')),
                ])
                ->extraViewData(['companyName' => 'Acme Corp']),
        ]);
}
```

### Header Action

[](#header-action)

Add the export action to your table's header actions to export all records (respecting active filters, search, and sort):

```
use JeffersonGoncalves\FilamentExportAction\Actions\FilamentExportHeaderAction;
use JeffersonGoncalves\FilamentExportAction\Enums\ExportFormat;

public function table(Table $table): Table
{
    return $table
        ->columns([
            TextColumn::make('name'),
            TextColumn::make('email'),
        ])
        ->headerActions([
            FilamentExportHeaderAction::make('export')
                ->formats([ExportFormat::Csv, ExportFormat::Xlsx, ExportFormat::Pdf])
                ->defaultFormat(ExportFormat::Xlsx)
                ->withFilters()
                ->withSearch()
                ->withSort()
                ->snappy()
                ->extraViewData(['companyName' => 'Acme Corp']),
        ]);
}
```

Configuration Options
---------------------

[](#configuration-options)

### Formats

[](#formats)

```
->formats([ExportFormat::Csv, ExportFormat::Xlsx, ExportFormat::Pdf])
->defaultFormat(ExportFormat::Xlsx)
```

### File Name

[](#file-name)

```
// Custom file name
->fileName('my-report')

// File name prefix (prepended to the name)
->fileNamePrefix('users')

// Disable prefix
->disableFileNamePrefix()

// Custom time format for the filename suffix
->timeFormat('d_m_Y-H_i')

// Disable file name input in the modal
->disableFileName()

// Full control via closure
->fileNameUsing(fn ($action) => 'custom-' . now()->format('Y-m-d'))
```

### Direct Download

[](#direct-download)

Skip the modal form and download immediately with default settings:

```
->directDownload()
```

### Columns

[](#columns)

```
// Use specific columns
->columns(['id', 'name', 'email'])

// Exclude columns
->excludeColumns(['password', 'remember_token'])

// Add extra Filament Column objects
->withColumns([
    TextColumn::make('full_address'),
])

// Disable the column filter checkboxes in the modal
->disableFilterColumns()

// Include hidden (toggled) columns in the export
->withHiddenColumns()

// Disable table columns entirely (use only additional columns)
->disableTableColumns()
```

### Additional Columns

[](#additional-columns)

Add extra columns with user-fillable inputs in the export modal:

```
->additionalColumns([
    AdditionalColumn::make('exported_at')
        ->label('Exported At')
        ->defaultValue(now()->format('d/m/Y')),
    AdditionalColumn::make('notes')
        ->label('Notes')
        ->defaultValue('N/A'),
])

// Disable additional columns
->disableAdditionalColumns()
```

### Format States

[](#format-states)

Custom formatting for column values:

```
->formatStates([
    'name' => fn ($value, $record) => strtoupper($value),
    'created_at' => fn ($value) => Carbon::parse($value)->format('d/m/Y'),
    'status' => fn ($value) => match ($value) {
        'active' => 'Active',
        'inactive' => 'Inactive',
        default => $value,
    },
])
```

### CSV Delimiter

[](#csv-delimiter)

```
->csvDelimiter(';')  // Default: ','
```

### PDF Driver

[](#pdf-driver)

By default, the package uses [barryvdh/laravel-dompdf](https://github.com/barryvdh/laravel-dompdf). You can switch to [barryvdh/laravel-snappy](https://github.com/barryvdh/laravel-snappy):

```
composer require barryvdh/laravel-snappy
```

```
// Use Snappy
->snappy()

// Or set driver explicitly
->pdfDriver('snappy')

// Custom PDF options
->pdfOptions(['paper' => 'a4', 'orientation' => 'landscape'])
```

### Page Orientation

[](#page-orientation)

```
// Set default page orientation for PDF export
->defaultPageOrientation('landscape')  // Default: 'portrait'
```

### Preview &amp; Print

[](#preview--print)

```
// Disable preview in the modal
->disablePreview()

// Disable print button
->disablePrint()
```

### Writer Callbacks

[](#writer-callbacks)

Customize the Excel or PDF writer before the file is generated:

```
// Modify the SimpleExcelWriter (CSV/XLSX)
->modifyExcelWriter(fn (SimpleExcelWriter $writer) => $writer)

// Modify the PDF instance (DomPDF or Snappy)
->modifyPdfWriter(fn ($pdf) => $pdf->setWarnings(false))
```

### Extra View Data

[](#extra-view-data)

Pass additional data to the PDF/print Blade templates:

```
// Static array
->extraViewData(['companyName' => 'Acme Corp'])

// Dynamic closure
->extraViewData(fn ($action) => [
    'recordCount' => $action->getRecords()->count(),
])
```

### Header Action Specific Options

[](#header-action-specific-options)

```
// Apply active table filters to export
->withFilters()

// Apply active search to export
->withSearch()

// Apply active sort to export
->withSort()

// Modify the query before export
->modifyQueryUsing(fn ($query) => $query->where('active', true))

// Multiple query modifications (they stack)
->modifyQueryUsing(fn ($query) => $query->where('active', true))
->modifyQueryUsing(fn ($query) => $query->where('role', 'admin'))
```

Config File
-----------

[](#config-file)

All options can be set globally via the config file:

```
// config/filament-action-export.php

return [
    'pdf_driver'                => env('FILAMENT_EXPORT_PDF_DRIVER', 'dompdf'),
    'default_format'            => env('FILAMENT_EXPORT_DEFAULT_FORMAT', 'xlsx'),
    'formats'                   => ['csv', 'xlsx', 'pdf'],
    'csv_delimiter'             => ',',
    'chunk_size'                => 1000,
    'time_format'               => 'Y-m-d_H-i',
    'pdf_options'               => [
        'paper'       => 'a4',
        'orientation' => 'portrait',
    ],
    'preview_enabled'           => true,
    'print_enabled'             => true,
    'use_snappy'                => false,
    'disable_additional_columns'=> false,
    'disable_filter_columns'    => false,
    'disable_file_name'         => false,
    'disable_file_name_prefix'  => false,
    'disable_preview'           => false,
    'icons'                     => [
        'action'  => 'heroicon-o-arrow-down-tray',
        'preview' => 'heroicon-o-eye',
        'export'  => 'heroicon-o-arrow-down-tray',
        'print'   => 'heroicon-o-printer',
        'cancel'  => 'heroicon-o-x-circle',
    ],
];
```

Customizing Views
-----------------

[](#customizing-views)

After publishing the views, you can customize them:

- `resources/views/vendor/filament-action-export/pdf.blade.php` - PDF template
- `resources/views/vendor/filament-action-export/print.blade.php` - Print template
- `resources/views/vendor/filament-action-export/components/table-view.blade.php` - Preview table

Translations
------------

[](#translations)

The package includes translations for: English, Brazilian Portuguese, Spanish, French, German, Italian, Dutch, Arabic, and Turkish.

After publishing, add your own translations in `lang/vendor/filament-action-export/`.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Jefferson Goncalves](https://github.com/jeffersongoncalves)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance90

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Recently: every ~12 days

Total

60

Last Release

62d ago

Major Versions

v2.6.11 → v3.6.112026-03-08

v1.5.11 → v2.6.122026-03-08

v2.6.12 → v3.6.122026-03-08

1.x-dev → 2.x-dev2026-04-26

2.x-dev → 3.x-dev2026-04-26

PHP version history (2 changes)v1.0.0PHP ^8.1

v2.0.0PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/411493?v=4)[Jefferson Gonçalves](/maintainers/jeffersongoncalves)[@jeffersongoncalves](https://github.com/jeffersongoncalves)

---

Top Contributors

[![jeffersongoncalves](https://avatars.githubusercontent.com/u/411493?v=4)](https://github.com/jeffersongoncalves "jeffersongoncalves (62 commits)")

---

Tags

csvexportfilamentfilament-pluginlaravellivewirepdfphpxlsxlaravelpdfexportxlsxcsvlivewirefilament

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/jeffersongoncalves-filament-action-export/health.svg)

```
[![Health](https://phpackages.com/badges/jeffersongoncalves-filament-action-export/health.svg)](https://phpackages.com/packages/jeffersongoncalves-filament-action-export)
```

###  Alternatives

[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3913.7k](/packages/rawilk-profile-filament-plugin)[stephenjude/filament-jetstream

A Laravel starter kit built with Filament inspired by Jetstream.

17758.9k2](/packages/stephenjude-filament-jetstream)[stephenjude/filament-two-factor-authentication

Filament Two Factor Authentication: Google 2FA + Passkey Authentication

84192.9k8](/packages/stephenjude-filament-two-factor-authentication)[marcelweidum/filament-passkeys

Use passkeys in your filamentphp app

6643.3k1](/packages/marcelweidum-filament-passkeys)[mradder/filament-logger

Audit logging, activity tracking, exports, alerts, and dashboards for Filament admin panels.

2310.5k](/packages/mradder-filament-logger)[wsmallnews/filament-nestedset

Filament nestedset tree builder powered by kalnoy/nestedset with Filament v4 and v5 support

196.5k14](/packages/wsmallnews-filament-nestedset)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
