rairaksa / php-excel-reader

Automatically exported from code.google.com/p/php-excel-reader
0 stars 0 forks source link

Can't read xls file. #111

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I am setting up an automated procedure to read data from an xls file.
If I try to read it directly from the original file i get:

The filename asd.xls is not readable.

I've figured out that the condition that is leading to this error message is:

substr(this->data,0,8) != IDENTIFIER_OLE
(for the read method in the OLERead class) At around Line 115.

The thing is... if I open up the file in Excel and do a save as to a new file, 
i am able to read that new file. Needless to say this doesn't work for an 
automated process ;-). I don't know enough about excel, but I'm guessing the 
version of the original file is too old, perhaps?

This is my code:

<?
require_once 'excel_reader2.php';
$data = new Spreadsheet_Excel_Reader("asd.xls");
print $data->val(2,2);
?>

Any help/advice would be greatly appreciated !!

C.

Original issue reported on code.google.com by carlosma...@gmail.com on 24 Mar 2011 at 5:41

Attachments:

GoogleCodeExporter commented 8 years ago
I have the same problem

Original comment by do...@makedevelopment.com on 23 Mar 2012 at 9:37

GoogleCodeExporter commented 8 years ago
The file you posted is a BIFF2 file, i.e. it was created with an Excel format 
from 1985. php-excel-reader only supports reading of Excel files 1995-2003.

Original comment by endar...@gmail.com on 25 Mar 2012 at 12:12