[英]How to write into excel sheet using java by creating dynamic web project
I want to insert data from a database to specified excel sheet cells.我想将数据库中的数据插入到指定的 Excel 工作表单元格中。 I have tried many type of code but didn't get solution.
我尝试了多种类型的代码,但没有得到解决方案。
My code is not working in Dynamic web project but it is working in normal java project.我的代码在动态 web 项目中不起作用,但在普通的 java 项目中起作用。 So please let me know how to insert and read from the excel sheet in dynamic web project.
所以请让我知道如何在动态 Web 项目中插入和读取 Excel 表。
You can use jExcelApi of java for reading/writing in excel file.您可以使用 java 的 jExcelApi 在 excel 文件中进行读/写。 check following link http://jexcelapi.sourceforge.net/resources/javadocs/2_6_10/docs/jxl/package-summary.html
检查以下链接http://jexcelapi.sourceforge.net/resources/javadocs/2_6_10/docs/jxl/package-summary.html
First we need to create object reference of workbook then sheet then cell and then write data in cell.首先我们需要创建工作簿的对象引用,然后是工作表,然后是单元格,然后在单元格中写入数据。
Refer this link https://www.programcreek.com/java-api-examples/index.php?class=jxl.write.WritableWorkbook&method=createSheet请参阅此链接https://www.programcreek.com/java-api-examples/index.php?class=jxl.write.WritableWorkbook&method=createSheet
for example例如
May this links useful for you.愿此链接对您有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.