How to export table data to excel

Notice: This thread is very old.
RaulCastro
Member | 3
+
0
-

Dear all,

I started now using Nette, and if you could advise me on this…
How should I go with export table data to excel?
The normal headers are exporting the entire page when I put it in a handler.

Thank you very much for your advice.

Pavel Kravčík
Member | 1195
+
0
-

We using something like this or you can extends Response for custom headers.

//Presenter
$this->sendResponse(new \Nette\Application\Responses\FileResponse('file.xls'));
$this->terminate();
RaulCastro
Member | 3
+
0
-

thank you