Web Hosting Talk







View Full Version : How to output a list from Database to Excel?


rbwire
05-21-2007, 03:51 AM
We are planning on using PHP/mySQL for the backend of our online school site. We want people to be able to sign up for classes and register, not unlike a normal college site.

What we need is the ability to take a "class list" of registered students and print out a report to have on the day of class, to make sure everyone shows up.

The end users collecting this data of course uses Microsoft Office. Is it possible to output from MySQL and into a MS Excel spreadsheet?

How about taking an excel spreadsheet and downloading it into the Database list? Can this be done or am I stuck having to learn VB, .net or whatever Microsoft wants me to pay for?

Is there any solutions out there to go from MSOffice to open source like PHP/MySQL?

Or how about any Open Office connectivity with PHP/MySQL?

thanks!
bob

artofmobile
05-21-2007, 08:53 AM
Output to a CSV file and you can open up in Excel.

gregh100
05-21-2007, 02:53 PM
phpMyAdmin is a great tool which can do exactly what you are looking for. Using phpMyAdmin, you can both export and import data pretty easily. Like artofmobile said, you would want to do this using a CSV file which can be saved in phpMyAdmin and opened in Excel, no problem.

You can find phpMyAdmin by searching on google... I'd post the address but apparently I can't post web addresses until I have 5 posts. Oh well. It's phpmyadmin . net

foobic
05-21-2007, 06:55 PM
Both MS Office and OpenOffice.org can connect directly to a MySQL database (Google it) but if it's a one-time thing, exporting to .csv and importing to Excel / OOo Calc would be the easier way to go.

ISPserver
05-21-2007, 07:02 PM
I used google and found php script mysql to exel. You can try it:

http://fundisom.com/phparadise/php/databases/mySQL_to_excel

epcmedia
05-22-2007, 12:23 AM
There is a great program for Windows, Mac, and Linux called Navicat (navicat.com). It is a great program for managing MySQL databases. You can actually drag excel files directly into the program and it will import them. The report generator will also let one query results directly to HTML, excel, and other formats. I use it daily.

Cheers