嗨,我正在 jsp 页面上显示图形,并且还在图形下方的网格中显示数据,现在我想将带有数据的图形导出到 Excel 工作表。在 Excel 中,数据将显示在下面的网格图表中。
提前致谢
最佳答案
首先,您需要下载此库并将其添加到您的类路径中 jexcelapi.sourceforge.net
你应该看看这个例子 reading and writing excel documents in Java
在您的 jsp 页面中,您可以有一个触发 servlet 的按钮。然后,servlet 将启动上面的脚本并响应浏览器。
servlet for creating excel documents
基本上 - 您需要将数据传递给 servlet,让 servlet 构建 Excel 文档,然后通过 HttpServletResponse 将其发送给用户。
祝你好运
关于java - 如何将jsp页面的图表导出到excel页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6175101/