Excel and PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Mr Tech
Forum Contributor
Posts: 424
Joined: Tue Aug 10, 2004 3:08 am

Excel and PHP

Post by Mr Tech »

Does anyone know of a good script where you can:

Read Data from a MS Excel File
Put the data from the MS Excel File into a MySQL Database

Thanks

Ben
User avatar
Mr Tech
Forum Contributor
Posts: 424
Joined: Tue Aug 10, 2004 3:08 am

Post by Mr Tech »

Oh yea, preferably free :)
jollyjumper
Forum Contributor
Posts: 107
Joined: Sat Jan 25, 2003 11:03 am

Post by jollyjumper »

Haven't tried this myself, but the description I've read looks promising.

http://www.phpclasses.org/browse/package/1919.html

Microsoft Excel is one of the most popular applications for desktop users, especially as a business work tool. Therefore the generation of spreadsheets in the Excel XLS format is a frequently used feature of Web applications to provide information in a way that lets their users do their work using Excel.

There have always been plenty of solutions to generate spreadsheet files in the XLS format. However, this class provide an innovating approach to the problem of generating XLS files.

This class takes advantage of the stream wrapping capabilities introduced in PHP 4.3 to let applications create XLS files just by using common file handling functions, making the generation of this type of files a trivial task.
ibizconsultants
Forum Commoner
Posts: 35
Joined: Tue Sep 07, 2004 12:07 pm

Post by ibizconsultants »

You could use this:
http://phpclasses.comrax.com/browse/package/1808.html

If you wish to design your own PHP XLS reader module, this could be useful
http://chicago.sourceforge.net/devel/docs/excel/

Hope this helps
http://www.ibizconsultants.com
User avatar
Mr Tech
Forum Contributor
Posts: 424
Joined: Tue Aug 10, 2004 3:08 am

Post by Mr Tech »

Hmm getting a Fatal error: Call to undefined function: stream_wrapper_register() in c:\program files\easyphp\www\excel\excel.php on line 180...

The stream_wrapper_register() doesn't exisit anywhere in any of the files...
User avatar
Mr Tech
Forum Contributor
Posts: 424
Joined: Tue Aug 10, 2004 3:08 am

Post by Mr Tech »

ibizconsultants wrote:You could use this:
http://phpclasses.comrax.com/browse/package/1808.html

If you wish to design your own PHP XLS reader module, this could be useful
http://chicago.sourceforge.net/devel/docs/excel/

Hope this helps
http://www.ibizconsultants.com
I'll have a look :) thanks
User avatar
Mr Tech
Forum Contributor
Posts: 424
Joined: Tue Aug 10, 2004 3:08 am

Post by Mr Tech »

User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

and you can save xls in 'XML spreadsheet' format (I believe it was introduced in Office 2000) which is fairly easy both to parse and write.
Post Reply