[Bug 61734] New: Error after writing XLSM file via XSSFWorkbook after reading the file

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

[Bug 61734] New: Error after writing XLSM file via XSSFWorkbook after reading the file

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

            Bug ID: 61734
           Summary: Error after writing XLSM file via XSSFWorkbook after
                    reading the file
           Product: POI
           Version: 3.17-FINAL
          Hardware: PC
            Status: NEW
          Severity: major
          Priority: P2
         Component: XSSF
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: ---

Created attachment 35501
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35501&action=edit
Source code to create the error

Hi,

I am using POI 3.17 final to read an Excel Macro file (xlsm).
There is no error during reading of the file.

Afterwards I read some sheets data and write this workbook back to file.
(there is no error during writing to a file, too.)

The written file is now corrupt and Excel, start with Version 20007, must
repair the file.

Message: Excel has found unreadable content in file XXX Do you like to repair
the Workbook? (Sorry this may be not the original english message, because i
use the german Version of Excel).

Excel try to repair this file and remove some Content.

See attachment for examples. The BugDemo-OUT.xlsm file is corrupt.

source code to test is attached, too.

Thanks in advance for your help.

Regards,

Uwe Herrmann

--
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 61734] Error after writing XLSM file via XSSFWorkbook after reading the file

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

--- Comment #1 from Uwe Herrmann <[hidden email]> ---
Created attachment 35502
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35502&action=edit
Original Excel - file to create the error

Please use the source code and this file to create the erroneous file

--
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 61734] Error after writing XLSM file via XSSFWorkbook after reading the 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=61734

--- Comment #2 from Uwe Herrmann <[hidden email]> ---
Created attachment 35503
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35503&action=edit
The erroneous Excel file created by original file and source code

This file will be created by source code and original Excel Macro file

--
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 61734] Error after writing XLSM file via XSSFWorkbook - file read via XSSFWorkbook before

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=61734

Uwe Herrmann <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
            Summary|Error after writing XLSM    |Error after writing XLSM
                   |file via XSSFWorkbook after |file via XSSFWorkbook  -
                   |reading the file            |file read via XSSFWorkbook
                   |                            |before

--
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 61734] Error after writing XLSM file via XSSFWorkbook - file read via XSSFWorkbook before

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=61734

--- Comment #3 from Javen O'Neal <[hidden email]> ---
As a workaround, if you're not modifying the Workbook, can you open it in read
only more via the OPCPackage class?

--
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 61734] Error after writing XLSM file via XSSFWorkbook - file read via XSSFWorkbook before

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=61734

--- Comment #4 from Uwe Herrmann <[hidden email]> ---
Dear Mr. Javen O'Neal,

alas it is not possible for me.
As you can see in my appended source code
(method speichereFormularVorlageDaten) ,
i need this to store an additional custom property in the excel macro file.

Originally, i use a ByteArrayInputStream to read the file by dint of
application Server.

The problem seems to be the ListObject inside the Excel macro file.
This is an extension to a QueryTable - Object since Excel 2007. Since an update
of Office, the QueryTable - Object will automatically changed to the
ListObject.
It is not possible to reverse this automatically change anymore.

Up to now i could not find the cause update.

Best regards

Uwe Herrmann

--
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 61734] Error after writing XLSM file via XSSFWorkbook - file read via XSSFWorkbook before

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=61734

Dominik Stadler <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #5 from Dominik Stadler <[hidden email]> ---
Can you also attach the original file so we can re-run the test-case with it to
reproduce the problem?

--
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 61734] Error after writing XLSM file via XSSFWorkbook - file read via XSSFWorkbook before

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=61734

--- Comment #6 from Uwe Herrmann <[hidden email]> ---
Dear Dominik Stadler,

you already find an attached file called BugDemo.xlsm to reproduce the error.
The error occurs after you rewrite the file with POI, as you can see by the
first attachment.

See also Attachments Original Excel - file to create the error.

Thanks in advance for your help!

Regards

Uwe Herrmann

--
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]