https://issues.apache.org/bugzilla/show_bug.cgi?id=52142

             Bug #: 52142
           Summary: Unable to read excel 2007 with structure locked
           Product: POI
           Version: 3.8-dev
          Platform: PC
        OS/Version: Windows Vista
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: XSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: suresh54...@gmail.com
    Classification: Unclassified


I am able to open the excel 2007 but when I protect it with structure
locking..I am not able to open it. I am using poi-3.8.beta4.

I dont think something is wrong with excel sheet.

Code:

 XSSFWorkbook workbook=null;
            InputStream inputStream = null;

                inputStream = new FileInputStream(new File("G:\\test.xlsx"));

            workbook=     new XSSFWorkbook(inputStream);


Error:


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:41)
    at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:178)
    at com.poi.xssf.XSSFWorkBook.main(XSSFWorkBook.java:97)
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:148)
    at org.apache.poi.openxml4j.opc.OPCPackage.getParts(OPCPackage.java:615)
    at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:229)
    at org.apache.poi.util.PackageHelper.open(PackageHelper.java:39)
    ... 2 more

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to