I followed this link - PHPExcel integration into Zend Framework
Copied files/folder as mentioned -
> /library
> /PHPExcel
> /PHPExcel.php
And added in application.ini file-
autoloaderNamespaces[] = "PHPExcel_"
autoloaderNamespaces[] = "PHPExcel"
Now under mysite\application\modules\admin\controllers
and in MysiteController.php
I am using this, in this manner -
public function getExcelDataAction()
{
$objPHPExcel = new PHPExcel();
$objPHPExcel->setActiveSheetIndex(0)->mergeCells('A1:D1');
$objPHPExcel->getActiveSheet()->setCellValue('A1', 'Swapnesh');
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
$filename = "my-data-sheet".".xlsx";
$objWriter->save($filename);
}
Following error occurred -
Fatal error: Class 'PHPExcel' not found in C:\webserver\mysite\application\modules\admin\controllers\MysiteController.php on line 526
Let me know how can i make it working in Zend
( beginner in zend)