Problem loading PHPExcel

I’ve downloaded the latest version of PHPExcel ( 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

$phpExcelPath = Yii::getPathOfAlias('application.extensions.phpexcel.Classes');


include($phpExcelPath . DIRECTORY_SEPARATOR . 'PHPExcel.php');

$objPHPExcel = new PHPExcel();

I get

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.



 Yii::import('ext.PHPExcel.Classes.PHPExcel', true);


 $objPHPExcel = new PHPExcel();


You may want to directly use EExcelView, it’s a widget extending CGridView and wrapping for PHPExcel, it’s really great and works by the minute.