I’ve downloaded the latest version of PHPExcel (http://phpexcel.codeplex.com/) and I unzipped and placed it in /protected/extensions/phpexcel. I am now trying to call PHPExcel from one of my controllers but I keep getting errors. Here is my code (from http://www.yiiframework.com/wiki/101/how-to-use-phpexcel-external-library-with-yii/):
$phpExcelPath = Yii::getPathOfAlias('application.extensions.phpexcel.Classes'); spl_autoload_unregister(array('YiiBase','autoload')); include($phpExcelPath . DIRECTORY_SEPARATOR . 'PHPExcel.php'); $objPHPExcel = new PHPExcel();
Fatal error: Class ‘CListIterator’ not found in /var/framework/collections/CList.php on line 87.
When I take out the spl_autoload line, I get
YiiBase::include(PHPExcel_Shared_ZipStreamWrapper.php) [<a href=‘yiibase.include’>yiibase.include</a>]: failed to open stream: No such file or directory.
It’s like no matter what I do I always get an error. Any help getting PhpExcel working for me is appreciated.