SpartnerNL / Laravel-Excel

🚀 Supercharged Excel exports and imports in Laravel
https://laravel-excel.com
MIT License
12.24k stars 1.91k forks source link

[Bug]: Invalid Spreadsheet file error #4202

Open vicenterusso opened 2 weeks ago

vicenterusso commented 2 weeks ago

Is the bug applicable and reproducable to the latest version of the package and hasn't it been reported before?

What version of Laravel Excel are you using?

3.1.56

What version of Laravel are you using?

10.48.20

What version of PHP are you using?

8.1.4

Describe your issue

I can import a CSV with headers like the example below with success, but when I queued it, it gives the error from title

This is the code I run for queuing that gives me the error. More context: I use ShouldQueue and ChunkReading

Excel::queueImport(new LeadsImport(
    importSession: $importSession,
    unitId: $unitId,
    campaignId: $campaignId,
    userId: auth()->user()->id,
), $request->file('file'));
Name;Phone;Whatsapp;Email;Res;Desc
ABEL;11932358500;;;;
ABNER;14232476126;;;;
ABNER;11921224156;;;;
ADRYEL;11955444869;;;;
ADRYEL;1195533467;;;;
ADRYELLE;4323402074;;;;
ADSON;11942423405;;;;
TEST;43243413;;;;

How can the issue be reproduced?

Just import a CSV with ShouldQueue, and ChunkReading

What should be the expected behaviour?

I expect to import without error throwing

patrickbrouwers commented 2 weeks ago

You are not on the latest version of this package, can you try and upgrade to 3.1.58 first to rule out it's related to any of the fixes that have been done.