Reading Excel spreadsheets from PHP
Moderator: General Moderators
- raghavan20
- DevNet Resident
- Posts: 1451
- Joined: Sat Jun 11, 2005 6:57 am
- Location: London, UK
- Contact:
Reading Excel spreadsheets from PHP
I have come across this necessity to read an excel file and copy the contents into Mysql database. I was wondering, where can I find scripts or tutorials to read from a Excel file using PHP.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Saw this and thought of you 
http://www.hotscripts.com/Detailed/48157.html
EDIT | DOH! It costs $99.00 - I missed that bit
http://www.hotscripts.com/Detailed/48157.html
EDIT | DOH! It costs $99.00 - I missed that bit
This seems interesting:
http://www.phpclasses.org/browse/package/1919.html
http://www.phpclasses.org/browse/package/1919.html
Did you ever figure anything out with reading from excel files? I checked out the excel class mentioned previously and it looks like it only exports to excel. I'm a php newbie so maybe I'm misunderstanding it and it really does read from excel files. Anyways, if anyone knows how to read from an excel file that would be great. For my application I would like to read from excel and then write directly to mysql, or better yet, create a query string that could be run on mysql remotely. Any help would be greatly appreciated!
There's an excellent example in this book. You can download source files here and just go from there
http://www.oreilly.com/catalog/phphks/
http://www.oreilly.com/catalog/phphks/