create excel reports from jsp

R

rishi

I m working on one project where in that there is a report section,in
which we have to display data on jsp by feching the data from the
database.Everything is working good but i want to include a button on
jsp page and after clicking that button that jsp page genrates an
excel sheet and excel sheet displays the data in the same sequence as
it is in the jsp. Please help me with the code
 
T

Tor Iver Wilhelmsen

PÃ¥ Thu, 17 May 2007 13:46:02 +0200, skrev rishi
I m working on one project where in that there is a report section,in
which we have to display data on jsp by feching the data from the
database.Everything is working good but i want to include a button on
jsp page and after clicking that button that jsp page genrates an
excel sheet and excel sheet displays the data in the same sequence as
it is in the jsp. Please help me with the code

Generate a HTML table with the data in cells, send it with

Content-Type: application/vnd.ms-excel
Content-Disposition: attachment; filename=yourname.xls

I leave it to the reader to find out how you set these response headers in
a JSP.
 
Joined
Apr 27, 2011
Messages
2
Reaction score
0
What about.. ?

Yeah, Mr. Wilhelmsen provided the most simple solution. If you are looking for any additional reporting capabilities down the road, I would even throw the step in for you to make sure the table is formatted in a way to allow an easy export.

-Conner
Excel Reports
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,818
Messages
2,569,727
Members
45,675
Latest member
benn

Latest Threads

Top