mcgrind
asked on
How do I export an html table to excel without ActiveX?
I write in JAVA and have gotten an html table to export to excel using Active X and javascript, but the computer's that are going to be using my export can't use Active X, so I need another way. My goal is to generate a table, which i have, have an 'export to excel' button, and when it's clicked, transfers the table data to excel for manipulation/saving..etc.. .any suggestions?
Include the following code in the .jsp page that generates the report/HTML page:
String mimeType = "application/vnd.ms-excel" ;
response.setContentType(mi meType);
fyi..
http://www.devx.com/tips/Tip/21382
String mimeType = "application/vnd.ms-excel"
response.setContentType(mi
fyi..
http://www.devx.com/tips/Tip/21382
String mimeType = "application/vnd.ms-excel" ;
response.setContentType(mi meType);
This will export the entire jsp page to an excel file.
I think mcgrind want only the table in the page to be exported.
response.setContentType(mi
This will export the entire jsp page to an excel file.
I think mcgrind want only the table in the page to be exported.
The display tag provides you with options to export to excel, which is built into it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
response.setContentType("a pplication /vnd.ms-ex cel");
response.setHeader("Conten t-disposit ion","atta chment;fil ename=repo rt.xls");
just corrected the syntax.
response.setHeader("Conten
just corrected the syntax.
http://displaytag.sourceforge.net/1.2/