transferring table to excel


I have an HTML table as an output, i want to export the table contents to excel, is it possible?
i am using to JSP with tomcat.
richard234Asked:
Who is Participating?
 
thomas908Connect With a Mentor Commented:
You may try

<%@ page contentType="application/vnd.ms-excel" %>

in your JSP page.

But his way you may not be able to have complete control over data

 That is just there to allow a easy way to convert table into a simple excel sheet.  If you want more control over the data, you may use POI:

http://jakarta.apache.org/poi/

0
 
richard234Author Commented:
I basically need to manipulate print options like

Orientation automatically selected as Landscape.
Scaling fit to one window.
Margin left 0.00

Will this help me?
0
 
thomas908Commented:
Yes POI will but NOT contentType.

Here is some additional reference how to set up print options:
http://jakarta.apache.org/poi/apidocs/org/apache/poi/hssf/usermodel/HSSFPrintSetup.html
0
 
Balaji108Commented:
required urgently sample code forExport to Excel for a jsp struts application.

thanks.
BR
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.