If you want to read any Microsoft excel file, then you can use an opensource php library to handle your task. The php library to read the excel file is "phpexcelreader". Recently I have used the library to read a excel file for one of my project. And it worked like a charm.
You can find the library using google "phpexcelreader" or by downloading from http://sourceforge.net/projects/phpexcelreader/
1) Just download the library and unzip it using your zip software.
2) Go inside the Excel folder, and open the reader.php file.
3) remove the below code from the top of the line.
4) And add the below code after remove that.
That's it. Now try to run the sample codes, and then apply this library with your project or whatever you need.
Thanks
Wolf.
You can find the library using google "phpexcelreader" or by downloading from http://sourceforge.net/projects/phpexcelreader/
1) Just download the library and unzip it using your zip software.
2) Go inside the Excel folder, and open the reader.php file.
3) remove the below code from the top of the line.
require_once 'Spreadsheet/Excel/Reader/OLERead.php';
4) And add the below code after remove that.
require_once 'Excel/oleread.inc';
That's it. Now try to run the sample codes, and then apply this library with your project or whatever you need.
Thanks
Wolf.
Comments
you can use http://www.dbTube.org
to import excel data into mySQL.
Thanks a lot for this library. You saved me from doing a lot of coding.
@Ricardo: I also pasted my file in the same folder and then changed the example xls to my xls file and it worked. It is showing me all the records of my .xls file and I am able to store them in mysql database.
Thanks a lot for this library. You saved me from doing a lot of coding.
@Ricardo: I also pasted my file in the same folder and then changed the example xls to my xls file and it worked. It is showing me all the records of my .xls file and I am able to store them in mysql database.
Error: Deprecated: Assigning the return value of new by reference is deprecated
The script on this line:
$this->_ole =& new OLERead();
I keep getting this error.
[16-Sep-2012 02:44:11] PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 66322433 bytes) in //excel-reader/Excel/oleread.inc on line 172
I keep getting this error.
[16-Sep-2012 02:44:11] PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 66322433 bytes) in //excel-reader/Excel/oleread.inc on line 172
For big files you should use NoXLS API Parser http://noxls.net/documentation