wood burning stoves 2.0*
The moose likes JDBC and the fly likes How to generate excel report Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to generate excel report" Watch "How to generate excel report" New topic
Author

How to generate excel report

pppawan sharma
Greenhorn

Joined: Dec 20, 2006
Posts: 3
Please any one give me some idea that how to get data from oracle database and generate excel report of that database.

I am getting the data from database but unable to generate excel report of that database. If possible please send java code for that.

Thanks
Dhanya Palanisamy
Ranch Hand

Joined: Oct 20, 2006
Posts: 61
Hi,

What are doing with the data returned from database, like whether you are displaying it in HTML table or storing it. If you are displaying it as table, place a DIV tag around the table. On click of the save button get the innerHtml using that tag, place it in a hidden variable. Then you can use your servlet to do the rest. Hope this makes sense.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41108
    
  45
If you want to create proper XLS files, then there are several libraries that help you do this, like POI and jExcelApi. Have a look at the AccessingFileFormats page which has a few relevant links.


Ping & DNS - my free Android networking tools app
 
Consider Paul's rocket mass heater.
 
subject: How to generate excel report
 
Similar Threads
jExcelAPI: How to change format cells text in excel as general format
Problem in generating pdf Jasper report from large amount of data
Cocoon Spring+Oracle database
Problem in Printing Large Number Of Records in JasperReports
XY chart in Excel