PHP and Excel

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
rodrigocaldeira
Forum Commoner
Posts: 27
Joined: Wed Mar 05, 2003 6:40 pm
Location: Brazil
Contact:

PHP and Excel

Post by rodrigocaldeira »

Hi anyone!

How can I use PHP to read MS Excel files, without using COM module??

Cheers!

Rodrigo Caldeira
bionicdonkey
Forum Contributor
Posts: 132
Joined: Fri Jan 31, 2003 2:28 am
Location: Sydney, Australia
Contact:

Post by bionicdonkey »

you could save the excel files as csv file
rodrigocaldeira
Forum Commoner
Posts: 27
Joined: Wed Mar 05, 2003 6:40 pm
Location: Brazil
Contact:

Post by rodrigocaldeira »

Yes, I see this today, but now Ihave another question.
I create a file.csv and how can I start the download of this file?

I ask this because I create the file and I put the location on my php file pointing to file.csv, but the file content is shown. How could I solve this?


Thanks!
bionicdonkey
Forum Contributor
Posts: 132
Joined: Fri Jan 31, 2003 2:28 am
Location: Sydney, Australia
Contact:

Post by bionicdonkey »

maybe something along the lines of:
header("Content-Disposition: attachment; filename=file.cvs");

have a look around for 'Content-Disposition'
rodrigocaldeira
Forum Commoner
Posts: 27
Joined: Wed Mar 05, 2003 6:40 pm
Location: Brazil
Contact:

Post by rodrigocaldeira »

Hi,

I tried and I got it!!

It's working perferctly!!!!


Thanks
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

phpclasses.org has a variety of classes regarding Excel, even without COM:

http://www.phpclasses.org/search.html?w ... o_search=1
maperen
Forum Newbie
Posts: 2
Joined: Fri Apr 04, 2003 4:35 am

Excel to PHP parser class.

Post by maperen »

You can use this script.
http://www.zakkis.ca/products/abc_excelparser/

and get Excel data into the PHP structures.
Post Reply