PHP: Warning: require_once(Spreadsheet/Excel/Reader/OLERead.php)

Did you get the error from your PHP/Excel library?
Warning: require_once(Spreadsheet/Excel/Reader/OLERead.php): failed to open stream: No such file or directory in ...??

Looks like you have downloaded the opensource phpexcelreader library and didn't edit the reader.php file. Just follow the below two steps, and it will get out from the error.

1) Open the reader.php file from the Excel folder. Remove the below code from the top of the line.
require_once 'Spreadsheet/Excel/Reader/OLERead.php';

2) And add the below code after remove that.
require_once 'Excel/oleread.inc';

Now try to run your code. It will work now.

Comments

purnimav said…
Just came across this post and the excel reading worked with the change suggested.
Thanks a lot !
Alex said…
My uncle send me a letter where he asked about excel problem. I advised him a tool, which I was found some days ago. To my great surprise, he thanked me a lot and besides I believe that this tool would be useful for any situation with excel files - excel spreadsheet repair.
Anonymous said…
Thanks
freelancer said…
It helps me. Thanks

http://www.freelancerin.com/
Vedovelli said…
Worked perfectly. Thanks.
Anonymous said…
I am getting
Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 32 bytes)
error, when script is executing on server.
Anonymous said…
Thank you so much.
Anonymous said…
Thank Thank Thank Thank Thank Thank !!!!!
Anonymous said…
Simple and clear and worked like a charm! Thanks
Anonymous said…
Simple and clear and works like a charm! Thanks
zip said…
Unicode not support... unicode becomes as ???????????????
Anonymous said…
Thank You So much pal...
RAVI MAURYA said…
Thanks I is really helpful:)