get error when upload file for import excel
i want to import excel in filament but not csv extention and xlsx,ImporterAction filament just get csv and can not import xlsx
so im using maatwebsite package but when use form in filament like this code
Tables\Actions\Action::make('test')->form([
FileUpload::make('test')
])->action(function ($data){
Excel::import(new MoadianImport,$data['test']);
})
get error
Could not find zip member zip:///var/www/html/storage/framework/cache/laravel-excel/laravel-excel-bdpt3IAx5mAIgTXDE3B4a4MJbc447cKD.xlsx#_rels.rels
but when use custom view in filament like this
<x-filament::input.wrapper>
<x-filament::input.select wire:model="productId" label="sad">
@foreach(\App\Enums\Moadian\MoadianRequestTypeEnum::cases() as $step)
<option>{{$step->name}}</option>
@endforeach
</x-filament::input.select>
</x-filament::input.wrapper>
<x-filament::input.wrapper class="mt-3">
<x-filament::input
type="file"
wire:model="file"
/>
</x-filament::input.wrapper>
<x-filament::button
type="submit"
color="warning"
class="w-full mt-3">
تایید اطلاعات
</x-filament::button>
i can upload excel
why can not import excel with header action form
4 Replies
please help for this issue because very important
Please don't tag people, if it is that important you can always post this question in #💰┊job-ads and pay for a quick solution.
All the help you now get is for free so if you really want to fix this as soon as possible pay for it.
Why not use ImportAction ?
see : https://filamentphp.com/docs/3.x/actions/prebuilt-actions/import
sure,im sorry for that
ImportAction just support csv
but i need import xlsx in this case
so i want to use another things
now i implemented matwebsite and if i use custom view in header its ok but when use filament form and uploadFile input get error
Could not find zip member zip:///var/www/html/storage/framework/cache/laravel-excel/laravel-excel-bdpt3IAx5mAIgTXDE3B4a4MJbc447cKD.xlsx#_rels.relsI think you didn't pass the correct path to the package and it just goes ahead and tries to import the non-existent file