We use spatie's Laravel Excel package for importing from and exporting to Excel and they have some limited testing on their documentation https://docs.laravel-excel.com/3.1/exports/testing.html. I am struggling to test if an export was correctly downloaded because the export uses multiple sheets. so the export itself literally only has a construct method and a sheets() method. I could not find anything else online. Thanks
Instead of testing, import the actual data and see if the entry got imported that you added to the excel sheets.
Looks like you need to get the file into the request and pass it that way or else put an absolute path.
$path = $request->file("csv")->getRealPath();
$import = new AssetImport;
$import->import($path, null, \Maatwebsite\Excel\Excel::CSV);
@Elliot_putt oh nooo, i put the wrong link. Im trying to test an export with multiple sheets. I was thinking i could maybe test each sheet individually but the export does have 5 sheets
@PierreZA hmm okay could you paste your export controller function and export class ?
I am correct in saying you want to export an excel file with multiple sheets?