Welcome Guest, Not a member yet? Register   Sign In
phpexcel problem
#1

[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 Smile)

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



Messages In This Thread
phpexcel problem - by El Forum - 06-20-2012, 03:50 AM
phpexcel problem - by El Forum - 06-20-2012, 10:55 AM
phpexcel problem - by El Forum - 06-20-2012, 09:02 PM
phpexcel problem - by El Forum - 06-21-2012, 12:43 AM
phpexcel problem - by El Forum - 06-21-2012, 12:57 AM
phpexcel problem - by El Forum - 06-21-2012, 01:26 AM
phpexcel problem - by El Forum - 06-21-2012, 01:37 AM
phpexcel problem - by El Forum - 06-21-2012, 02:12 AM
phpexcel problem - by El Forum - 06-21-2012, 02:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB