If you use the extension http://www.yiiframew...p-excel-reader/, you might get an error while using it if you do not specify the absolute path to the xls file. The code to read .xls file is the following
$data=new JPhpExcelReader('example.xls');
It should be changed to
$data=new JPhpExcelReader(Yii::app()->getBasePath().'/import/example.xls');
Yii::app()->getBasePath() return /var/www/projectname/protected. "import" is the folder name where the .xls is kept
Page 1 of 1
Yii Php-Excel-Reader Resolve the path to the .xls or any file
Share this topic:
Page 1 of 1

Help











