F
Filament12mo ago
Sector

Importing excel

Hey! Which is the best way to import an excel file? Where i can define which field responsible which data in the db?
2 Replies
Dennis Koch
Dennis Koch12mo ago
You can try an import plugin: https://filamentphp.com/plugins/eightynine-excel-import If that doesn't work for you, you can fallback to a Laravel plugin.
Filament
Excel Import by Eighty Nine - Filament
This package adds a new action to your filament resource table, allowing you to easily import data to your model from excel files.
jmrufo
jmrufo3d ago
Hello colleagues. I installed this package to import Excel into Filament and I'm encountering the following problem. According to the documentation, you can include this method so the user can download a sample file: ->sampleFileExcel( url: url('excel/users.xlsx'), sampleButtonLabel: 'Download Sample', customiseActionUsing: fn(Action $action) => $action->color('secondary') ->icon('heroicon-m-clipboard') ->requiresConfirmation(), ) The problem is that when including this method, an error is generated indicating that it doesn't exist: Method EightyNine\ExcelImport\ExcelImportAction::sampleFileExcel does not exist. Is this a package error? Has anyone had this problem? Regards.

Did you find this page helpful?