Custom Filament Page to Download Excel Report

Filament 4/5
Also available in Filament 3 version

A demonstration of selecting form values and exporting data based on those selections.

01JH0D1W339T9BD2TZMY2BF4K8

Get the Source Code:

Only This Example

$9

One-time payment

Full source code for Custom Filament Page to Download Excel Report
Downloadable ZIP file with the source code
Lifetime access to this example
GitHub Sign in with GitHub to buy

Sign in first, then complete your $9 checkout.

Best value — all 168 examples

FilamentExamples Membership

$99 /year
or
$199 lifetime
Access to code of all 168 examples
Future new examples and updates included
FilaCheck Pro package licence included
MCP server included
View membership plans

30-day money-back guarantee

How it works

We have a custom Filament page with a form to select a date and a customer.

app/Filament/Pages/Download.php:

use Filament\Schemas\Schema;
use Filament\Pages\Page;
use App\Models\Customer;
use Filament\Support\Icons\Heroicon;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\DatePicker;
 
class Download extends Page
{
protected static string | \BackedEnum | null $navigationIcon = Heroicon::OutlinedDocumentText;
 
protected string $view = 'filament.pages.download';
 
public ?array $data = [];
 
public function mount(): void
{
$this->form->fill();
}
 
public function form(Schema $schema): Schema
{
return $schema
->components([
DatePicker::make('trade_date')
->minDate(now()->subMonths(2)->startOfMonth())
->maxDate(today()),
Select::make('customer')
->required()
->options(Customer::pluck('name', 'id')),
])
->statePath('data');
}
}
The FULL tutorial is available after the purchase: in the Readme file of the official repository you would get invited to.