for a project of my boss i am making a program with the help of the PHPExcel engine.I bumped into a big problem. I first created a new spreadsheat from a mysql database. This database is quite big and the excel-file exsists out of 3 sheets with each 200 colums
and 15000 rows. Generating the file took about 60 seconds with 160 MB peak RAM usage. This was no problem, because i only needed to generate it once.
But now I need to update the file 2 times a day.
I've made an phpform that sends info into the mysql database and then extracts the new info and adds it to the big excelfile. But with the engine i have to read the whole file first into $objPHPExcel with the reader.(takes 55 seconds) Then i change/add the
new information to the correct sheet and write the file with the excel writer.
But this takes about 1 minute for just adding 2 rows, because I first have to read everything and then write everything again...:<
Now the question.
Is there a way/function in the writer that just updates sheets or some rows in an excisting Excel-file?? With the reader you can read parts with the readfilter, but with the writer i've seen nothing that can do it the other way around. Now I can't do nothing
with the realfilter, because if I save the file, all other data that i did not read will be lost.
BTW: I use Excel5 engine part.
Feb 10, 2009 at 5:40 PM
At the moment, there is no way to update just a part of the Excel 5 file; and I don't see any likelihood in the future either (particularly with the binary format Excel 5). We are aware of the speed and memory issues, and this is already flagged as a work
item and being addressed.