File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes save a report as an excel file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "save a report as an excel file" Watch "save a report as an excel file" New topic

save a report as an excel file

JayaSiji Gopal
Ranch Hand

Joined: Sep 27, 2004
Posts: 303
I have a jsp page, which queries the db2 database (uses MVC architecture) to get a resultset, based on search criteria specified.

The query works fine, and the results get displayed. When I click on "Export to Excel", it opens up the File Download dialog box.

The problem is :

1- I need to click 2 times on the "Open" button to open up the report.
2- The first column header is present, but the first column data is missing from the report.

The data is present in the result set. but it is not reaching the jsp page.

Any ideas,

SCJP 1.4, SCWCD 1.4<br /> <br />Thanks in advance!<br />Jayashree.
Praveen palukuri
Ranch Hand

Joined: Feb 10, 2005
Posts: 65
we have one Package in java to create excelsheet and place the data into that. i.e.,


Refer to this.

We created excelsheet and filled with data using above package in my project.

JayaSiji Gopal
Ranch Hand

Joined: Sep 27, 2004
Posts: 303
thank you for the reply, I am aware of the POI tool. However, they are not using it in this project.
Carol Enderlin
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364

Your original post indicates what the problems are, but not what your code is. What code is called when user clicks on "Export to Excel"?
Dhanya Palanisamy
Ranch Hand

Joined: Oct 20, 2006
Posts: 61

Is Export to Excel a button in your JSP? Are you exporting a html table(containing result set data) to Excel? How you are trying to export?
Give details.
I agree. Here's the link:
subject: save a report as an excel file
jQuery in Action, 3rd edition