Reading Excel spreadsheets from PHP

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Reading Excel spreadsheets from PHP

Post by raghavan20 »

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.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Saw this and thought of you ;)

http://www.hotscripts.com/Detailed/48157.html

EDIT | DOH! It costs $99.00 - I missed that bit :P
User avatar
wwwapu
Forum Contributor
Posts: 197
Joined: Wed Apr 07, 2004 11:57 am
Location: Turku, Finland

Post by wwwapu »

jonathant
Forum Commoner
Posts: 32
Joined: Sat Jan 07, 2006 3:13 pm

Post by jonathant »

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!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

ancient thread!

search pear.php.net, there's a proposed class that reads them.
User avatar
wtf
Forum Contributor
Posts: 331
Joined: Thu Nov 03, 2005 5:27 pm

Post by wtf »

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/
Post Reply