Looking for a PHP class to generate HUGE xlsx files, without having to allocate huge memory for the entire file to fit in memory.
We love PHPExcel but need a way to write-on-the-fly, versus loading the entire file in memory, then calling a function to write it.
Seen a similar question, but no clear pointer to a solution.
To clarify –
You have 1GB of available memory and need to generate a 3GB Excel file.
Is there an existing class/method to accomplish this?
Yay!
We ended up solving this by writing our own PHP Excel class, capable of generating xlsx files of UNLIMITED size, by writing on-the-fly (never loading all data into memory).
Thank you to everyone who contributed your feedback and ideas! Much appreciated.
Our class doesn’t have all the bells & whistles phpexcel.codeplex offers. We do support fonts, basic styling and automatic sheet creation when your dataset exceeds 1 million rows.
Going to clean-up the class and put it on Github for everyone to use. I’ll update this post with the url as soon as it’s available.