Writing multiple files

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

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 3: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 3:58 PM
So simple ! ^^

Thank you very much !