Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Excessively wide XLSX generated by Access handled inappropriately by Excel::import #4252

Open
1 task done
craigpipeandpiper opened this issue Nov 26, 2024 · 1 comment
Labels

Comments

@craigpipeandpiper
Copy link

craigpipeandpiper commented Nov 26, 2024

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

  • Yes, it's still reproducable

What version of Laravel Excel are you using?

3.1.56

What version of Laravel are you using?

10.48.23

What version of PHP are you using?

8.3.13

Describe your issue

We are currently creating an importer which imports excel xlsx spreadsheets generated from Microsoft Excel. For some reason, these generated spreadsheets each have 16384 columns on each row, where all the columns after the valid few (in our case 18 columns) contain a null. As such each row when imported as a container has 16384 values, mostly nulls, meaning that reading a spreadsheet of 1000 values reads 1000x16384 cells. This runs out of memory before even calling the collection() method of the importer class.

I am aware of the WithChunkReading concern and am using it, but this slows down and complicates what should be a simple process.

How can the issue be reproduced?

Import a spreadsheet generated by microsoft access. If needed and you cannot easily duplicate, i can provide a sample.

What should be the expected behaviour?

Automatically identify these malformed sheets (i am unsure if this fix should be in this package, or upstream at phpoffice) and work around the null ends of the sheet where there is an excessive number of null columns, so that we don't need to use chunked reading with what should be trivially small spreadsheets.

@patrickbrouwers
Copy link
Member

(i am unsure if this fix should be in this package, or upstream at phpoffice

I'd advise discussing this at phpspreadsheet, as I don't think there's anything we can do out of the box here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants