Export HTML table to Excel - using jQuery or Java

前端 未结 9 1690
慢半拍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:23

    You can parse the table using a library like http://jsoup.org/

    After you get the data, you can store it in Excel-compatible format (CSV), or using Java Excel library for that like POI, or using JDBC to write data into Excel sheet, see this example: Password Protected Excel File

提交回复
热议问题