0

Something in a csv file I am trying to import using Maatwebsite's Laravel Excel package (which uses PhpOffice's PhpSpreadsheet package) is causing the import to blow up with the following exception:

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

I believe there is some data in the file causing this to blow up as if I reduce the number of records in the file down to a few, it works just fine. Problem is, I do not know what I am looking for as the root cause of this. Has anyone else run into this issue? What am I looking for?

Jason Ayer
  • 621
  • 1
  • 10
  • 20

1 Answers1

0

Switching the file format from csv to xlsx resolved this issue. I tried changing the delimeter to a pipe symbol, but that didn't make a difference.

Not sure what bad data was in there.

Jason Ayer
  • 621
  • 1
  • 10
  • 20
  • my data is like: `POINTER THERMOMETER 0-600°C` . so how can i resolve that? from this error? `Failed to load C:\xampp\htdocs\flash-forgepvtltd\storage\framework\cache\laravel-excel\laravel-excel-RQAxNiFX5gE94jMGX8wsef1swxo0ezOy.html as a DOM Document` – khush Aug 22 '23 at 11:55