lundi 15 avril 2019

Why am I getting this exception "C:\Users\...\AppData\Local\Temp\laravel-excel-... is an Invalid Spreadsheet file"?

I am using Maatwebsite's Laravel Excel for one of my projects and recently I started receiving this exception when trying to parse a file:

PhpOffice \ PhpSpreadsheet \ Reader \ Exception
C:\Users\jasona\AppData\Local\Temp\laravel-excel-U4hpHI5YnNosEQdeZdohQReOlZXoYmTU is an Invalid Spreadsheet file.

This is in my main import controller:

public function users()
{
  Excel::import(new UserImport, storage_path('app\import\Users.csv'));

  return redirect()->route('import');
}

Why is this happening? I checked this location for this "file" it's trying to find and I could not find anything matching. I also checked the temp folder permissions and the Windows user I am using has Full Control rights to it, so I'm not sure what is going on.

This was working fine a while ago. Not sure what would have happened on my machine to break it.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire