I would like to use PHPExcel library in a zend framework 2 project. But I don't want to load it for the overall project, just in one particular action. How can I do this?
If your PHPExcel library is load by composer.phar
yo can access the class through:
$objPHPExcel = new \PHPExcel();
else, you must include path of your library before use :
/** Include path **/
ini_set('include_path', ini_get('include_path').';<relative directory path>/');
/** PHPExcel */
include 'PHPExcel.php';
$objPHPExcel = new PHPExcel();