Note that there are some explanatory texts on larger screens.

plurals
  1. POintegrate PHPExcel withe ZendFramework 2
    text
    copied!<p>I try to use both libraries PHPWord and PHPExcel as two libraries in ZendFramework2 that is to say put them in /lib of Zend Framework 2 and load them into my controller with </p> <p>in my autoload.php i put the following </p> <pre><code>&lt;?php // autoload.php generated by Composer require_once __DIR__ . '/composer' . '/autoload_real.php'; return ComposerAutoloaderInit689ffe38af096b92264c8f237441d64e::getLoader(); require_once 'Zend/Loader/Autoloader.php'; $loader = Zend_Loader_Autoloader::getInstance(); $loader-&gt;autoloadernamespaces[] = "Excel_"; $loader-&gt;registerNamespace('Excel_'); $loader-&gt;setFallbackAutoloader(true); if ($configSection == 'development') { $loader-&gt;suppressNotFoundWarnings(false); } </code></pre> <p>my Controller is : </p> <pre><code>&lt;?php namespace Auth\Controller; use Zend\Mvc\Controller\AbstractActionController; use Zend\Excel\PHPExcel; class AuthController extends AbstractActionController { public function LoginAction() { $objPHPExcel = new PHPExcel_Reader_Excel5(); $document = $objPHPExcel-&gt;load('example1.xls'); echo date('H:i:s') , " Données Ajoutées Avec Succés" ; $document-&gt;setActiveSheetIndex(0) -&gt;setCellValue('A1', 'Mike') -&gt;setCellValue('D2', 'Spils); // Save Excel5 file $objWriter = PHPExcel_IOFactory::createWriter($document, 'Excel5'); $objWriter-&gt;save(str_replace('.php', '.xls', __FILE__)); } } </code></pre> <p>` but the classe is not being load </p> <p>i get the following error</p> <pre><code>( ! ) Fatal error: Class 'Auth\Controller\PHPExcel_Reader_Excel5' not found in C:\wamp\www\zend\module\Auth\src\Auth\Controller\AuthController.php on line 14 </code></pre> <p>any one can help me pleeeeaase ? </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload