Computing.Net > Forums > Web Development > export data to Excel file in JSP

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

export data to Excel file in JSP

Reply to Message Icon

Name: priti
Date: April 7, 2005 at 21:45:43 Pacific
OS: Win 2000 Prof.
CPU/Ram: P3
Comment:

Hi,
I need help on exporting data to excel file in JSP.
Code contains:
<%@ page content-type=application/vnd.ms-excel" language="java">
PrintWriter pw = new PrintWriter();
My question is, I get multiple data such as machine type, serial no., description from the DB2 database.
I have following statements in code :
while (rs.next) { //collecting data from database
machinetype= rs.getString(1);
....
pw.println(machinetype + serialno + description);
}
pw.flush();
pw.close();


}

I do not get this work.
Any help would be appreciated.
Thanks.

priti



Sponsored Link
Ads by Google

Response Number 1
Name: Sanjaya Sugiarto (by Sanjaya)
Date: April 9, 2005 at 23:47:55 Pacific
Reply:

You need POI ( http://jakarta.apache.org/poi/ )


0

Response Number 2
Name: priti
Date: April 22, 2005 at 16:49:53 Pacific
Reply:

Thanks for your reply.

Is there any other way we can export data from the database to EXCEL using JSP?

priti


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: export data to Excel file in JSP

HTML link to a file in the users PC www.computing.net/answers/webdevel/html-link-to-a-file-in-the-users-pc/2942.html

link to files in a different folder www.computing.net/answers/webdevel/link-to-files-in-a-different-folder/2961.html

Having issue with multipart/form-data in jsp www.computing.net/answers/webdevel/having-issue-with-multipartformdata-in-jsp/4169.html