Yii Framework Forum: Yexcel Extension - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Yexcel Extension problem installing Rate Topic: -----

#1 User is offline   scallas 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 06-August 12

Posted 05 November 2012 - 04:37 PM

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!
0

#2 User is offline   Peter JK 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 84
  • Joined: 22-November 10
  • Location:Jakarta, Indonesia

Posted 07 November 2012 - 09:43 PM

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...
0

#3 User is offline   samilo 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 231
  • Joined: 04-October 12

Posted 12 November 2012 - 02:07 AM

I had same problem
0

#4 User is offline   Michel Kogan 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 21
  • Joined: 28-February 11

Posted 16 November 2012 - 02:12 PM

View Postscallas, on 05 November 2012 - 04:37 PM, said:

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 ?
0

#5 User is offline   Michel Kogan 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 21
  • Joined: 28-February 11

Posted 17 November 2012 - 03:00 AM

View PostPeter JK, on 07 November 2012 - 09:43 PM, said:

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.
0

#6 User is offline   umbalaconmeogia 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 24-November 12

Posted 25 November 2012 - 12:01 AM

View Postscallas, on 05 November 2012 - 04:37 PM, said:

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 


In Yexcel.php, change
<?
to
<?php

0

#7 User is offline   Gevorg 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 29-August 11

Posted 29 November 2012 - 09:53 PM

View PostPeter JK, on 07 November 2012 - 09:43 PM, said:

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.yiiframew...brary-with-yii/
0

#8 User is offline   Ziggi 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 95
  • Joined: 14-August 12

Posted 17 January 2013 - 03:39 PM

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 !
2

#9 User is offline   Subtronic 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 13-March 13

Posted 13 March 2013 - 02:33 PM

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 -(
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users