我得到这个错误的数据驱动测试与excel。我已经添加了3.6版本的POIjar。下面是错误:
org.apache.poi.openxml4j.exceptions.InvalidOperationException: Can't open the specified file: 'C:\Users\pjadhav1\AppData\Local\Temp\poifiles\poi-ooxml-747722852.tmp'
at org.apache.poi.openxml4j.opc.ZipPackage.<init>(ZipPackage.java:102)
at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:199)
at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:178)
at org.apache.poi.util.PackageHelper.open(PackageHelper.java:53)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:176)
at com.iopendr.xls.read.Xls_Reader.<init>(Xls_Reader.java:32)
at com.iopendr.test.DriverScript.start(DriverScript.java:96)
at com.iopendr.test.DriverScript.main(DriverScript.java:60)
1560 [main] DEBUG devpinoyLogger - *********INITIALIZE ALL TESTCASES IN***********Login
Exception in thread "main" java.lang.NullPointerException
at com.iopendr.xls.read.Xls_Reader.getRowCount(Xls_Reader.java:43)
at com.iopendr.test.DriverScript.start(DriverScript.java:106)
at com.iopendr.test.DriverScript.main(DriverScript.java:60)
1条答案
按热度按时间dw1jzc5e1#
excel文件已损坏。修复后,问题解决。