tfertil
Posts: 43
|
| Posted: 12/04/2010, 9:16 AM |
|
Hi everyone,
Has anyone exported a web report to Excel or PDF?
I'm using PHPExcel to export datasets (queries) to Excel.
But... how can I export a web reports to Excel?
Thanks
|
 |
 |
caryarit_ferrer
Posts: 1
|
| Posted: 11/24/2011, 5:56 AM |
|
using this on the before show
$name= mifilename
header("Content-type: application/vnd.ms-excel");
header('Content-Disposition: filename="'.$name.'.XLS";');
_________________
y si nos bajamos del carro y volvemos a entrar? |
 |
 |
tfertil
Posts: 43
|
| Posted: 11/24/2011, 6:20 AM |
|
Thank Caryarit_Ferrer, for your reply.
I tried that, and it works, but now I have a problem with the CSS files. When I try to open an Excel file created this way, Excel looks for the CSS file from the CodeCharge template, and give me an error message because it can't find the file.
I changed the CSS reference to an absolute, complete one, like this
http://www.mysite.com/css/mycssfile.css
But... if I open the Excel file without internet connection, again I got an error message and an ugly report (not my carefully designed colors, fonts, etc.).
Any idea will be appreciated.
Thanks.
|
 |
 |
|