https://bz.apache.org/bugzilla/show_bug.cgi?id=61275

            Bug ID: 61275
           Summary: Excel could not open <file> because some content is
                    unreadable
           Product: POI
           Version: 3.15-FINAL
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 35110
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35110&action=edit
corrupt xlsx file

Hi, if I generate an xlsx file using a war deployed on Tomcat, I do not get an
error.  When I generate the same xlsx file using a war deployed on WebSphere I
get the above error.  I am attributing the difference to a difference in
implementation of the zip functionality between Oracle JVM and IBM JVM (so
perhaps this bug should go to IBM).

If I try to open the corrupt version, it gives me the message, and I can choose
to fix it, whereupon it opens.  However, the excel log does not give me
information about what was fixed.

There are slight differences between a couple of files in the resulting diffs.  
Here are the differences in the output of zipinfo:

Good xlsx:

gloucester-pc:Downloads cbuxbaum$ zipinfo Results\ \(13\).xlsx 
Archive:  Results (13).xlsx   6704 bytes   11 files
-rw----     2.0 fat      598 bl defN 10-Jul-17 13:43 _rels/.rels
-rw----     2.0 fat     1197 bl defN 10-Jul-17 13:43 [Content_Types].xml
-rw----     2.0 fat      184 bl defN 10-Jul-17 13:43 docProps/app.xml
-rw----     2.0 fat      443 bl defN 10-Jul-17 13:43 docProps/core.xml
-rw----     2.0 fat      131 bl defN 10-Jul-17 13:43 xl/drawings/drawing1.xml
-rw----     2.0 fat      138 bl defN 10-Jul-17 13:43 xl/sharedStrings.xml
-rw----     2.0 fat     3601 bl defN 10-Jul-17 13:43 xl/styles.xml
-rw----     2.0 fat      350 bl defN 10-Jul-17 13:43 xl/workbook.xml
-rw----     2.0 fat      576 bl defN 10-Jul-17 13:43 xl/_rels/workbook.xml.rels
-rw----     2.0 fat    22610 bl defN 10-Jul-17 13:43 xl/worksheets/sheet1.xml
-rw----     2.0 fat      305 bl defN 10-Jul-17 13:43
xl/worksheets/_rels/sheet1.xml.rels
11 files, 30133 bytes uncompressed, 5230 bytes compressed:  82.6%

Bad xlsx:

gloucester-pc:Downloads cbuxbaum$ zipinfo Results\ \(15\).xlsx 
Archive:  Results (15).xlsx   6745 bytes   11 files
-rw----     2.0 fat      596 bl defN 10-Jul-17 13:52 _rels/.rels
-rw----     2.0 fat     1195 bl defN 10-Jul-17 13:52 [Content_Types].xml
-rw----     2.0 fat      184 bl defN 10-Jul-17 13:52 docProps/app.xml
-rw----     2.0 fat      441 bl defN 10-Jul-17 13:52 docProps/core.xml
-rw----     2.0 fat      131 bl defN 10-Jul-17 13:52 xl/drawings/drawing1.xml
-rw----     2.0 fat      138 bl defN 10-Jul-17 13:52 xl/sharedStrings.xml
-rw----     2.0 fat     3601 bl defN 10-Jul-17 13:52 xl/styles.xml
-rw----     2.0 fat      350 bl defN 10-Jul-17 13:52 xl/workbook.xml
-rw----     2.0 fat      574 bl defN 10-Jul-17 13:52 xl/_rels/workbook.xml.rels
-rw----     2.0 fat    22610 bl defN 10-Jul-17 13:52 xl/worksheets/sheet1.xml
-rw----     2.0 fat      303 bl defN 10-Jul-17 13:52
xl/worksheets/_rels/sheet1.xml.rels

tail of od command on _rels/.rels:

good version:

0001100    037057  005015  027474  062522  060554  064564  067157  064163
0001120    070151  037163  005015                                        
0001126

bad version:

0001100    037057  005015  027474  062522  060554  064564  067157  064163
0001120    070151  037163                                                
0001124

I am attaching the following:

Our Excel struts action
The Excel Helper class that builds the excel

The bad(corrupt) xlsx
The good xlsx

Thanks!

Carl Buxbaum

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to