Yii 1.1: php-excel-reader

PHP Excel Reader - Parse and retrieve information from XLS files
16 followers

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.

Total 13 comments

#13157 report it
shafi at 2013/05/09 05:59am
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

#10204 report it
sirin k at 2012/10/11 02:08am
Same issue on this windows also

Same issue on this windows also

#10196 report it
sirin k at 2012/10/10 06:24am
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.

#10136 report it
sirin k at 2012/10/06 09:01am
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

#10032 report it
sirin k at 2012/10/01 09:40am
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

#9310 report it
paskuale at 2012/08/02 11:01pm
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);

#9259 report it
blogtj at 2012/08/01 01:22am
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...

#8968 report it
groc426 at 2012/07/10 05:47pm
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.

#6998 report it
banamlehsb at 2012/02/17 09:59pm
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.

#5423 report it
cass at 2011/10/10 09:35pm
Nice work

Works nicely for me. Made the changes as per the other comments as well. Thanks!

#5203 report it
rashmani at 2011/09/22 03:45am
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);
  • to make things work, in function '_encodeUTF16' I had to change:
$result = mb_convert_encoding($string, $this->_defaultEncoding, 'UTF-16' );

into:

$result = mb_convert_encoding($string, $this->_defaultEncoding, 'UTF-8' );
  • still euro sign is not recognized, I've seen reports about this issue at google code but haven't found a solution yet. Nevertheless, very very useful one!

Ciao, rash*

#5163 report it
jinmmd at 2011/09/20 01:10pm
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.

#4897 report it
rei at 2011/08/26 07:43am
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 :).

Leave a comment

Please to leave your comment.

Create extension
  • Yii Version: 1.1
  • License: New BSD License
  • Developed by: jerry2801
  • Category: File System
  • Votes: +9 / -3
  • Downloaded: 4,626 times
  • Created on: Jan 27, 2010
  • Last updated: May 18, 2010