1

我在使用 excel 进行数据驱动测试时收到此错误。我添加了 3.6 版本的 POI Jar。以下是错误:

    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)
4

1 回答 1

0

Excel 文件已损坏。一旦修复,问题就解决了。

于 2014-01-09T21:23:53.767 回答