This PHP library expands on the great work done in the PHP Excel Reader project on SourceForge.
It reads the binary format of XLS files directly and can return values and formats from any cell.
Resources ¶
Documentation ¶
Requirements ¶
- Yii 1.0 or above
Installation ¶
- Extract the release file under
protected/extensions
Usage ¶
See the following code example:
Yii::import('ext.phpexcelreader.JPhpExcelReader');
$data=new JPhpExcelReader('example.xls');
echo $data->dump(true,true);
Change Log ¶
January 27, 2010 ¶
- Initial release.
Deprecated function in PHP 5.3
This is surely a useful extension; however, it uses 'split' function, which is deprecated if you use PHP 5.3. To solve it, we just need to change it to 'explode'.
Anyway, thank you for providing this extension :).
You do the things I want to
Nowadays I used the PHPExcelReader in my website, I find it is very useful and efficacious, thank you for providing this extension, and I guess you can figure out the PHPExcelWirter in a few days.
By the way, the PHPExcelReader is inherit from Spreadsheet_Excel_Writer.
Very nice ext with a few glitches...
Hi there,
yep, very nice ext, I've got here while re-building our intranet.
A couple of (small) glitches tough and some info:
'split' vs. 'explode' issue, as re1nald0 pointed out; I've substituted all occurrences and things seem to work fine
for testing purposes, I've added these two lines, which helped out tracking errors:
error_reporting(E_ALL ^ E_NOTICE); ini_set('display_errors', 1);
$result = mb_convert_encoding($string, $this->_defaultEncoding, 'UTF-16' );
into:
$result = mb_convert_encoding($string, $this->_defaultEncoding, 'UTF-8' );
Nevertheless, very very useful one!
Ciao,
rash*
Nice work
Works nicely for me. Made the changes as per the other comments as well. Thanks!
Re: Deprecated function in PHP 5.3
I have this error when I used this extension.
"Assigning the return value of new by reference is deprecated"
I try to change 'split' function by 'explode' function but it can't solve my problem.
Deprecated function in PHP 5.3
Besides what was mentioned previously, you must also change this line under Spreadsheet_Excel_Reader function:
$this->_ole =& new OLERead();
to
$this->_ole = new OLERead();
As of PHP 5 you can't pass a reference by reference.
return a row ro a cell?
How can I return the value of a cell or a row?
using $data->dump(true,true); i return the whole text of the excel...
undefined offset [solved]
I've this php notice : excel_reader2.php(397)
line :return $this->colInfo[$sheet][$col]['width']/9142*200;
function :colwidth($col,$sheet=0)
why :( ?
solution: add error_reporting(E_ALL ^ E_NOTICE);
Hi,File cannot be readable.
hi i tried this,
my code:
Yii::import('application.modules.admin.extensions.phpexcelreader.JPhpExcelReader'); $excelFile=CUploadedFile::getInstance($model,'excel'); $data=new JPhpExcelReader($excelFile->getTempName()); echo $data->dump(true,true);
and i got an error like below
The filename /tmp/php9bK5Mf.xls is not readable
/extensions/phpexcelreader/excel_reader2.php(985)
please help me.
Sirin
date field issue
hi,
i have a date column in my excel sheet. eg:24/12/2012
but when parsing this record through this extension im getting like
MonMon/DecDec/20122012
have any solution to get the exact date format i have given in my excel sheet?
please help
-Sirin
Not readable issue again.
hi guys.
i have generated an excel sheet using this Yii extenion
http://www.yiiframework.com/extension/phpexcel/
But when i tried to upload and parse that file through this extension it shows an error that this file is not readable.then i have copied and pasted the same data inside the excel file and made a normal excel sheet manuall which is a new file and tried to parse with this extension, At that time its worked fine.
Have any idea about this issue?
im using ubuntu 12.04.
i guess this will be a permission issue.anyway please let me know
if you got this same issue or resolved this issue.
Same issue on this windows also
Same issue on this windows also
xlsl file is showing not readable
plz help me out ...using JPhpExcelReader it is showing error while reading xlsl file...culd u plz tell me a way to fix it
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.