[Bug 62017] New: Writing more than 1024 OLE objects in a single spreadsheet creates probably an invalid file

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 62017] New: Writing more than 1024 OLE objects in a single spreadsheet creates probably an invalid file

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=62017

            Bug ID: 62017
           Summary: Writing more than 1024 OLE objects in a single
                    spreadsheet creates probably an invalid file
           Product: POI
           Version: 3.17-FINAL
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: ---

Created attachment 35684
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35684&action=edit
Contains the Excel file with 5000 OLE objects in it, and the source code of the
program I've written.

Hi:

I have attached a test program that triggers the error. Basically, this is how
I trigger the error:

 - The program create more than 1024 OLE objects and anchors in an Excel sheet;
 - The generated file is opened and saved with Excel - in this process, the
Excel file size shrinks;
 - When loading the Excel file, errors are thrown.

This is a sample of the error:

Failed to add a shape to the collection, row no [0], shape will be ignored
[org.apache.poi.POIXMLException: Ole object not found in sheet container - it's
probably a control element]
org.apache.poi.POIXMLException: Ole object not found in sheet container - it's
probably a control element
        at
org.apache.poi.xssf.usermodel.XSSFObjectData.getOleObject(XSSFObjectData.java:132)
        at
org.apache.poi.xssf.usermodel.XSSFObjectData.getObjectPart(XSSFObjectData.java:151)
        at
com.emerald_associates.spreadsheetimpexp.sketch_board.ApachePoiMultipleOleObjectsBug.lambda$testRead$0(ApachePoiMultipleOleObjectsBug.java:137)
        at java.util.ArrayList.forEach(ArrayList.java:1249)
        at
com.emerald_associates.spreadsheetimpexp.sketch_board.ApachePoiMultipleOleObjectsBug.testRead(ApachePoiMultipleOleObjectsBug.java:131)
        at
com.emerald_associates.spreadsheetimpexp.sketch_board.ApachePoiMultipleOleObjectsBug.main(ApachePoiMultipleOleObjectsBug.java:90)

The problem occurs for each OLE object added above 1024. So if I add 1050 OLE
Objects, I will get 26 errors.

I am using Apache POI 3.17, Java 8, and Excel 2017 from Office 365. To me, it
appears that the file is generated with some sort of error that Excel clears up
when it opens the file.

We also created a sample file where 5000 OLE objects were created with Excel -
I am attaching that file here - in this example, there are no errors when the
OLE objects are read with the test program.

Attached I am sending the test program I've written, and the Excel file with
the 5000 OLE objects. Running the program should trigger the error, just follow
the instructions on it.

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

Reply | Threaded
Open this post in threaded view
|

[Bug 62017] Writing more than 1024 OLE objects in a single spreadsheet creates probably an invalid file

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=62017

Ravi Wallau <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
                 CC|                            |[hidden email]

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

Reply | Threaded
Open this post in threaded view
|

[Bug 62017] Writing more than 1024 OLE objects in a single spreadsheet creates probably an invalid file

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=62017

--- Comment #1 from Ravi Wallau <[hidden email]> ---
This problem appears only when there are more than 1024 OLE objects in a sheet.
In the new version of the test program attached, I write 1024 OLE objects in 3
different sheets (3072 in total) and the issue does not occur.

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

Reply | Threaded
Open this post in threaded view
|

[Bug 62017] Writing more than 1024 OLE objects in a single spreadsheet creates probably an invalid file

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=62017

--- Comment #2 from Ravi Wallau <[hidden email]> ---
Created attachment 35689
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35689&action=edit
This version of the programs writes 3072 OLE objects across 3 different sheets
- the problem does not occur

Hi:

This version writes the notebook contents across 3 sheets, with 3072 OLE
objects in total - the issue does not occur here, which means that the problem
occurs only with more than 1024 objects in a single sheet.

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