Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Excel Java.lang.NoClassDefFoundError:org/openxmlformats/schemas/spreadsheetml/x2006/main/ctextensionlist在groovy中_Excel_Groovy_Soapui_Xssf - Fatal编程技术网

Excel Java.lang.NoClassDefFoundError:org/openxmlformats/schemas/spreadsheetml/x2006/main/ctextensionlist在groovy中

Excel Java.lang.NoClassDefFoundError:org/openxmlformats/schemas/spreadsheetml/x2006/main/ctextensionlist在groovy中,excel,groovy,soapui,xssf,Excel,Groovy,Soapui,Xssf,我正在尝试访问现有的Excel工作表,并尝试创建一个新工作表,并使用一些值更新工作表,执行时,我得到以下行“rowHeader.createCell((短)count).setCellValue(“test1”);”的错误 Java.lang.NoClassDefFoundError:org/openxmlformats/schemas/spreadsheetml/x2006/main/ctextensionlist执行以下代码时出错 下面是我用过的罐子的清单 commons-codec-1.9

我正在尝试访问现有的Excel工作表,并尝试创建一个新工作表,并使用一些值更新工作表,执行时,我得到以下行“rowHeader.createCell((短)count).setCellValue(“test1”);”的错误 Java.lang.NoClassDefFoundError:org/openxmlformats/schemas/spreadsheetml/x2006/main/ctextensionlist执行以下代码时出错

下面是我用过的罐子的清单

commons-codec-1.9

commons-logging-1.1.3

commons-net-3.3-ftp

junit-4.12

jxl-2.6.6-来源

jxl-2.6

log4j-1.2.17

总报告

ojdbc6

poi-3.13-20150929

poi-3.15-β1

poi-examples-3.13-20150929

poi-examples-3.15-beta1

poi-excelant-3.13-20150929

poi-Excellant-3.15-beta1


poi-ooxml-3.5-beta5

poi-ooxml-3.13-20150929

poi-ooxml-3.15-beta1

poi-ooxml-schemas-3.13-20150929

poi-ooxml-schemas-3.15-beta1

poi-scratchpad-3.13-20150929

poi-scratchpad-3.15-beta1

postgresql-9.3-1102.jdbc41

sqljdbc42, xmlbeans-2.6.0

import java.io.*;
import java.util.*;
import java.util.List;
import javax.xml.parsers.*;
import javax.xml.xpath.*;
import javax.xml.datatype.*;
import javax.xml.*;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import org.w3c.dom.*;
import org.apache.poi.ss.usermodel.*;
import java.util.Iterator;
import java.lang.*;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
  import org.apache.poi.xssf.usermodel.XSSFWorkbook;



def fname = new Date().format("MM-dd-YYYY-HH-mm-a-z")
def TimeStamp = context.expand('${General_Properties#Current_Date}')
def destination_path_File = context.expand('${General_Properties#Destination_path}')
def destination_path = destination_path_File + "_" + TimeStamp
def Request = testRunner.testCase.getTestStepByName("Alliance_Ser")
//def FileName = "Individual Coverages Premium Result"
def Vehical = context.expand('${General_Properties#Alliance_Vehicals}')
def Driver = context.expand('${General_Properties#Alliance_Drivers}')
def FolderName = context.expand('${General_Properties#StateCode}')
def FileName = FolderName + "_Result_Status and Total Premiums_" + Vehical + "_Vehicals_" + Driver + "_Drivers"
def ResultPath = destination_path + "\\" + FolderName + "\\" + FileName + "_" + TimeStamp + ".xls"
log.info ResultPath


FileInputStream fileIn = new  FileInputStream(new File(ResultPath))
 XSSFWorkbook workbook = new XSSFWorkbook(fileIn);

 XSSFSheet sheet = workbook.createSheet("Coverage_Resp_report");
short count = 0;
Row rowHeader = sheet.createRow((short)count);
rowHeader.createCell((short) count ).setCellValue("test1");
//rowHeader.createCell((short) count ).setCellValue("Test2");

FileOutputStream fileOut =new FileOutputStream(new File(ResultPath));  //Open FileOutputStream to write updates
workbook.write(fileOut); //write changes
fileOut.close();  

复制lib文件夹中的“ooxml-schemas-1.3.jar”文件后,问题得到了解决

您的类路径是什么?我在soapUI工具中执行此操作。我没有定义类路径,我只是导入了它,除非您指定,否则无法对其进行映像。不管怎样,您在soapui下复制了哪些库?poi-ooxml-3.5-BETA5就这一个文件?您能列出
SOAPUI\u HOME/bin/ext
目录下可用的所有jar文件吗。