user198003
user198003

Reputation: 11151

How to save an Excel file created with PHPExcel, without dialog?

I am trying to generate an Excel file (xls), using PHPExcel, but have it saved on the server instead of having it prompted for download on my desktop!

How can I instruct PHPExcel to save my file instead of having the dialog presented by the browser?

Upvotes: 5

Views: 19576

Answers (1)

user198003
user198003

Reputation: 11151

Ok, I get it:

I have to use:

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

... and not to define headers, because header "telling" to browser to save file.

Thank you anyway!

Upvotes: 8

Related Questions