this module worked for me initially. but then I added Yii2 and spent a long time looking for a solution to the problem. for those who find this topic, as I did and also added Yii2 to Yii1, I will leave this solution.
for me first helped this.
spl_autoload_unregister(['YiiBase', 'autoload']);
require_once Yii::app()->params['rootPath'] . '/PHPExcel/Classes/PHPExcel.php';
spl_autoload_register(['YiiBase', 'autoload']);
when i added Yii2 i changed
spl_autoload_unregister(['Yii', 'autoload']);
spl_autoload_unregister(['YiiBase', 'autoload']);
require_once Yii::app()->params['rootPath'] . '/PHPExcel/Classes/PHPExcel.php';
spl_autoload_register(['YiiBase', 'autoload']);
spl_autoload_register(['Yii', 'autoload']);
next use
$objPHPExcel = new \PHPExcel();
...
$objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');