Creating a new export file with PhpExcel library seems very easy, but when I try to open an existing excel file and write in that file I have problems, can anyone help me on this matter?
$xls = PHPExcel_IOFactory::load($download.'/'.$this->getFileName()); .... //add data to the file .... $objWriter = PHPExcel_IOFactory::createWriter($xls, 'Excel5'); $objWriter->save($download.'/'.$this->getFileName());
The error that I receive is an exception that is raised I suppose but I can not get the whole error to be displayed because of the unregister command that we need to call before initializing a PHPExcel object.
Therefore the error that I get is CExpection class is not found, but due to debugging I found out that the problem comes from this line:
I have checked and the $download.’/’.$this->getFileName() has the correct value.
Thank you in advance for your help.