Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to generate excel report

 
pppawan sharma
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic