Export HTML table to Excel - using jQuery or Java

前端 未结 9 1685
慢半拍i
慢半拍i 2020-12-06 07:13

I\'ve a HTML table on my JSP page, that I want to be exported to Excel on a button click.

What would be the best way of going about this?

(For ex., how would

相关标签:
9条回答
  • 2020-12-06 07:37

    You would have to create something on the server-side (like a servlet) to read the html and create the excel file and serve it back to the user.

    You could use this library to help you do the transformation.

    0 讨论(0)
  • 2020-12-06 07:39

    Exporting to Excel file format with JQuery is impossible.

    You can try with Java. There are a lot of libraries to do that.

    0 讨论(0)
  • 2020-12-06 07:40

    I would recommend Apache POI, we've been using it for years, never had any problems.

    Alot of examples online to get a good start, and the documentation on the site is also good: http://poi.apache.org/spreadsheet/quick-guide.html

    0 讨论(0)
提交回复
热议问题