File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases 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 and Relational Databases
Bookmark "How to generate excel report" Watch "How to generate excel report" New topic

How to generate excel report

pppawan sharma

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.

Dhanya Palanisamy
Ranch Hand

Joined: Oct 20, 2006
Posts: 61

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

Joined: Mar 22, 2005
Posts: 42965
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.
I agree. Here's the link:
subject: How to generate excel report
It's not a secret anymore!