Exporting Data to MS Excel

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
iknownothing
Forum Contributor
Posts: 337
Joined: Sun Dec 17, 2006 11:53 pm
Location: Sunshine Coast, Australia

Exporting Data to MS Excel

Post by iknownothing »

Hey Guys,
I was wondering if were all possible (most likely with PHP) to export data from a MySQL database into an excel spreadsheet. Reason being, I am designing an accounting application, and most accountants over here (Australia) are fond of recieving financial data in Excel form...
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Take a look in PEAR.
decipher
Forum Commoner
Posts: 38
Joined: Mon Mar 13, 2006 6:27 am
Location: south africa

Post by decipher »

If you are not familiar with PEAR, you can save the info in a csv format you open in excel.

Take a look into the putscsv() function (PHP Ver 5)
Alternatively in conjunction with fwrite() you can build the deliminated file structure yourself quite easily.
Post Reply