Getting error when working with Data Driven Framework with Apache POI – Excel

Hi all,

I am getting below error when working with Data Driven Framework with Apache POI – Excel. If some one facing this issue before please help out. Thanks.

Exception in thread “main” org.apache.poi.POIXMLException: org.apache.poi.openxml4j.exceptions.InvalidFormatException: Package should contain a content type part [M1.13]
at org.apache.poi.util.PackageHelper.open(PackageHelper.java:39)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:274)
at utility.ExcelUtils.setExcelFile(ExcelUtils.java:37)
at automationFramework.Apache_POI_TC.main(Apache_POI_TC.java:27)
Caused by: org.apache.poi.openxml4j.exceptions.InvalidFormatException: Package should contain a content type part [M1.13]
at org.apache.poi.openxml4j.opc.ZipPackage.getPartsImpl(ZipPackage.java:197)
at org.apache.poi.openxml4j.opc.OPCPackage.getParts(OPCPackage.java:696)
at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:280)
at org.apache.poi.util.PackageHelper.open(PackageHelper.java:37)
… 3 more

Add Comment
1 Answer(s)

can u give your code?

victor Reviewer Answered on April 8, 2016.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.