scallas
(Scott)
November 5, 2012, 9:37pm
1
Hello,
I’m trying to get the Yexcel extension installed and keep coming up with the following error:
include(Yexcel.php): failed to open stream: No such file or directory
I have followed the setup instructions (which seem extremely simple – link to the extension page) and checked into loading extensions from the Yii wiki. Doesn’t seem like I’ve missed anything.
Files for the extension were placed under the extensions directory:
– extensions (dir)
---- yexcel
------ Classes (dir)
------ Yexcel.php
Here is the components section from my main config:
'components'=>array(
'user'=>array(
// enable cookie-based authentication
'allowAutoLogin'=>true,
),
'yexcel' => array(
'class' => 'ext.yexcel.Yexcel'
),
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=********',
'emulatePrepare' => true,
'username' => 'root',
'password' => '********',
'charset' => 'utf8',
),
'errorHandler'=>array(
// use 'site/error' action to display errors
'errorAction'=>'site/error',
),
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
array(
'class'=>'CFileLogRoute',
'levels'=>'error, warning',
),
),
),
),
And here is where the extension is being called (from a controller):
public function actionImport()
{
$file_path = dirname(__FILE__) . '/files/sample.xls';
$data = Yii::app()->yexcel->readActiveSheet($file_path);
$this->render('import',array(
'data'=>$data,
));
}
Any thoughts?
Thanks!
some problem but this is my error
include(PHPExcel_Shared_ZipStreamWrapper.php) [<a href=‘function.include’>function.include</a>]: failed to open stream: No such file or directory
it seems the PHPExcel AutoLoader doesn’t work…
scallas:
Hello,
I’m trying to get the Yexcel extension installed and keep coming up with the following error:
include(Yexcel.php): failed to open stream: No such file or directory
I have followed the setup instructions (which seem extremely simple – link to the extension page) and checked into loading extensions from the Yii wiki. Doesn’t seem like I’ve missed anything.
Files for the extension were placed under the extensions directory:
– extensions (dir)
---- yexcel
------ Classes (dir)
------ Yexcel.php
Here is the components section from my main config:
'components'=>array(
'user'=>array(
// enable cookie-based authentication
'allowAutoLogin'=>true,
),
'yexcel' => array(
'class' => 'ext.yexcel.Yexcel'
),
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=********',
'emulatePrepare' => true,
'username' => 'root',
'password' => '********',
'charset' => 'utf8',
),
'errorHandler'=>array(
// use 'site/error' action to display errors
'errorAction'=>'site/error',
),
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
array(
'class'=>'CFileLogRoute',
'levels'=>'error, warning',
),
),
),
),
And here is where the extension is being called (from a controller):
public function actionImport()
{
$file_path = dirname(__FILE__) . '/files/sample.xls';
$data = Yii::app()->yexcel->readActiveSheet($file_path);
$this->render('import',array(
'data'=>$data,
));
}
Any thoughts?
Thanks!
did you check directory permissions ?
some problem but this is my error
include(PHPExcel_Shared_ZipStreamWrapper.php) [<a href=‘function.include’>function.include</a>]: failed to open stream: No such file or directory
it seems the PHPExcel AutoLoader doesn’t work…
can you provide more information about your problem ?
I really have no problem when following instruction provided in the extension’s page.
some problem but this is my error
include(PHPExcel_Shared_ZipStreamWrapper.php) [<a href=‘function.include’>function.include</a>]: failed to open stream: No such file or directory
it seems the PHPExcel AutoLoader doesn’t work…
Look here : http://www.yiiframework.com/wiki/101/how-to-use-phpexcel-external-library-with-yii/
Ziggi
(Ziggi)
January 17, 2013, 8:39pm
8
In file ‘yexcel/Yexcel.php’ change
from:
<?
to:
<?php
Then in file: ‘yexel/Classes/PHPExcel/Autoloader.php’ starting in line 27 (just after initial comments) change
from:
PHPExcel_Autoloader::Register();
to:
spl_autoload_unregister(array('YiiBase', 'autoload'));
PHPExcel_Autoloader::Register();
spl_autoload_register(array('YiiBase', 'autoload'));
And enjoy your Excel files in Yii !
Subtronic
(Crashmybrain)
March 13, 2013, 7:33pm
9
Hello, may u tell, can i create excel files from this extension - yexcel, or i can only read excel files?
P.S. sry for this, i don’t know where i can ask this, i hav’t premissions for any move -(