Export to Excel .xls and Change File Name for PHP
How to Export Excel .xls
From grid-excel-php.zip
- File : gridExcelGenerator.php
In Row 24 : public $outputType = ‘Excel2007’
You have to change from ‘Excel2007’ to ‘Excel2003’ and then Try!. - File : gridExcelWrapper.php
In Row 203 : public function outXLS($title, $type = ‘Excel2007’)
You have to change from ‘Excel2007’ to ‘Excel2003’.
But for me only “1.” works really fine.
How to Change File Name
From grid-excel-php.zip
- File : gridExcelWrapper.php
In Row 203 : public function outXLS($title, $type = ‘Excel2007’){}
In switch case you will see " header('Content-Disposition: attachment; filename=“report.xls” ');"
and then change filename here.
Thanks!
grid-excel-php.zip (773 KB)