PDA

View Full Version : web development


tintin4u20
10-07-2009, 11:06 AM
Hi,

I am developing a web application using RAD
I am using MYsql server.My coding is in java
I want to know how to move data from Database into Excel sheet.
I also need to know how to retrieve data from Database and show it in excel file.

Thanks in advance for any replies.

Mrinmoy

brad211987
10-07-2009, 03:13 PM
You can check out the Apache POI library for interfacing with excel: http://poi.apache.org/

Also there is the JExcelAPI that is a slimmed down but fast and easy library to use: http://jexcelapi.sourceforge.net/

The general approach I usually take is:


Execute your query and save the results into a list.
Do any processing, sorting, or manipulation you want.
Iterate over the the list and write it to excel using one of the above libraries row by row.

Hope that gives you a kickstart, if you need help with the code, give it a shot and post any problems you are having.