Integrate PHPExcel output/file save with HTML page

Topics: User Forum
Jan 5, 2012 at 5:20 PM


I've downloaded and installed PHPExcel and used it successfully in my PHP site. It's producing and downloading the excel files perfectly. However, for the life of me, I can't integrate the generation and filesave into a web page. When the user clicks on a menu link in another page, I want to give them a page saying "Thanks, your report is being built" or similar, then ideally another when finished, plus the regular File Open/Save bar with the report.  Is it not possible to achieve this with PHPExcel?

Jan 5, 2012 at 5:42 PM

PHPExcel is purely a library reading/updating/writing Spreadsheet files, and doesn't care whether it's used in web scripts or run form the command line. As such, it doesn't even know that it's been integrated with a web page.

How you do this is purely up to your web page: you could (for example) set your web page up to open the download in a new target window, while using a js redirect to display your "Thanks" page.