[eluser]Damjan[/eluser]
Hi,
i am new to Codeigniter. I use PHPExcel library to make excel file, now I want to download file through browser. I have made excel file, and following code try to execute download:
$this->load->library('PHPExcel');
$this->load->library('PHPExcel/IOFactory');
$this->load->library('PHPExcel/Writer/Excel2007');
.
.
.
$objPHPExcel->getActiveSheet()->setTitle('Simple');
$objWrite = IOFactory::createWriter($objPHPExcel,'Excel2007'); // HERE ERROR HAPPENING (I think

)
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
header('Content-Disposition: attachment;filename="30template.xlsx"');
header('Cache-Control: max-age=0');
$objWrite->save('php://output');
BUT error display:
Fatal error: Cannot redeclare class Excel2007 in C:\Users\Damjan\Dropbox\Projects\www\PhoneNumber\application\libraries\PHPExcel\Writer\Excel2007.php on line 36