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

PhpSpreadSheet is memory intensive, consider replacing it with Spout! #357

Open
Ziggizag opened this issue Dec 29, 2021 · 5 comments
Open

Comments

@Ziggizag
Copy link

It is practically impossible to output larger files with this extension. Memory limit errors render it unusable. Please, considering replacing phpspreadsheet dependency with Spout:

https://opensource.box.com/spout/

@Mohsen6558
Copy link

Like

@chriscpty
Copy link

I'm running into the same problem atm. Seeing as spout is no longer maintained, what PHP excel library do we want to use instead?

  • openspout is a fork of spout, but seems to add breaking changes in minor version updates a lot (such as randomly dropping php8.1 support in 4.26.0, despite 8.1 not being EOL), which will probably lead to problems down the line
  • PHP_XLSXWriter looks alright, but is not very well documented

@kartik-v I'd be willing to put some time into adding one of these libraries for the Xlsx export but need a decision first, which one should we use? Or do you know of a different Excel library that does the trick?

@kartik-v
Copy link
Owner

Thanks for updating on this. @chriscpty I had a quick glance and somehow feel if an upgrade is to be done - it must be on the more scalable recent library - tilting towards openspout - assuming we should support the later PHP releases only. But since this is an export only library - I think PHP_XLSXWriter should be a good choice as well (will do a bit more study when I have time). I feel we can go with either. For older PHP releases the PHP Spreadsheet version can still continue to be installed by users. Any opinions?

Suggestion is to work on a PR and will upgrade to a major release on openspout with a BC breaking change. Still maintaining PHP spreadsheet for BC.

@chriscpty
Copy link

I'd personally probably prefer openspout as PHP_XLSXWriter hasn't been maintained in a while either and is really lacking documentation wise.

We're going to have to keep the PHPSpreadsheet dependency either way as neither of them support the exports to other formats such as PDF - we'll have to fall back to PHPSpreadsheet for those.

I'd probably use the last version of openspout that does support php8.1 tho, purely because the project i'm running into this issue with is running on 8.1 :P

@kartik-v
Copy link
Owner

kartik-v commented Jan 3, 2025

Suggest to include a boolean property like useOpenSpout based on which open spout library will be used with the limitations you mentioned below.

I'd personally probably prefer openspout as PHP_XLSXWriter hasn't been maintained in a while either and is really lacking documentation wise.

We're going to have to keep the PHPSpreadsheet dependency either way as neither of them support the exports to other formats such as PDF - we'll have to fall back to PHPSpreadsheet for those.

I'd probably use the last version of openspout that does support php8.1 tho, purely because the project i'm running into this issue with is running on 8.1 :P

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

No branches or pull requests

4 participants