How to save an Excel file created using PHPExcel without a dialog?

I am trying to create an Excel (xls) file using PHPExcel , but saved it on the server instead of being prompted to download it to the desktop!

How can I instruct PHPExcel to save my file and not the dialog presented by the browser?

+3
source share
1 answer

OK I understood:

I need to use:

$objWriter->save('nameoffile.xls');

... and do not define headers because the header tells the browser to save the file.

Anyway, thanks!

+7
source

All Articles