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?
Who is Participating?
Murali MurugesanConnect With a Mentor Full stack Java developerCommented:
you can use display tag if you have the luxuy of time to understand and implement the little API.
if not as @Ramanhp: mentioned use the content type and create your table on an individual jsp .When opening it,it is rendered as excel.

     response.setheader(inline/attachment,file.xls) <make sure u corect the syntax>

This would render your table contents in excel format.

Gibu GeorgeChief Technology OfficerCommented:
You can do this easily if you use display tag to build the table.
Include the following code in the .jsp page that generates the report/HTML page:

      String mimeType = "application/";

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to and use offer code ‘EXPERTS’ to get 10% off your first purchase.

Gibu GeorgeChief Technology OfficerCommented:
String mimeType = "application/";

This will export the entire jsp page to an excel file.

I think mcgrind want only the table in the page to be exported.
Gibu GeorgeChief Technology OfficerCommented:
The display tag provides you with options to export to excel, which is built into it.
Murali MurugesanFull stack Java developerCommented:

just corrected the syntax.
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.