简体   繁体   English

如何通过创建动态Web项目使用java写入excel表

[英]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.

相关问题 如何使用Java在Selenium中已经打开的Excel工作表上书写 - How to write on already open excel sheet in Selenium using java 如何使用jlx在Java的同一Excel工作表中写入数据循环? - How to write loop of data in the same excel sheet in Java using jlx? 通过使用 java selenium 如何在 Excel 表中写入数据 - By using java selenium how to write data in Excel sheet 如何使用java为Excel工作表定义动态单元格范围? - How to define dynamic cell range for Excel sheet using java? 使用java在excel表中创建数据透视表 - creating Pivot table in excel sheet using java 如何使用Java动态Web项目和Angularjs在项目上实施测试 - How to implement testing on a project using java dynamic web project, and Angularjs 使用Java和WebDriver以Excel工作簿名称创建Excel工作表 - Creating Excel sheet with Excel workbook name using Java with webdriver 将数据写入Excel工作表Java - Write data into Excel sheet java 如何编写程序以从Excel工作表中读取,从Java中的Excel工作表中写入 - How to write a programme to Read from an excel sheet , write from an excel sheet in java How to write test result(pass/fail) in excel sheet using selenium web driver and java without hard coding row_num and Col_num in my program - How to write test result(pass/fail) in excel sheet using selenium web driver and java without hard coding row_num and Col_num in my program
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM