Writing multiple files

Topics: User Forum
Apr 30, 2013 at 2:33 PM
Edited Apr 30, 2013 at 2:39 PM
Hi

I'm using PHPExcel to save datas comming from my db but I'd like to create 2 different files (workbook) in the same time, is it possible ?

To be more specific, I know how to create and use multiple sheets but in my case I need 2 files with different datas and the best would be to propose to download a zip archive containing the files.

I hope to be clear, thanks for your help
Apr 30, 2013 at 2:56 PM
Create two workbooks ($objPHPExcelFile1=new PHPExcel(); $objPHPExcelFile2=new PHPExcel();), use the save method for each to a temp directory, zip the two files.
If this uses too much memory, created the first file, cleans the memory, created the second.
Apr 30, 2013 at 2:58 PM
So simple ! ^^

Thank you very much !