[Bug 61543] New: XSSFTable bug table remove after create

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

[Bug 61543] New: XSSFTable bug table remove after create

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

            Bug ID: 61543
           Summary: XSSFTable bug table remove after create
           Product: POI
           Version: 3.17-FINAL
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: ---

I am facing a issue when try to remove a XSSF Table after creating one.

Here is my test case with manual print out result.

    Create 3 tables on a single sheet.

     [java] Create Table Name: /xl/tables/table1.xml - Content Type:
application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml
     [java] Create Table Name: /xl/tables/table2.xml - Content Type:
application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml
     [java] Create Table Name: /xl/tables/table3.xml - Content Type:
application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml

Delete table2

    [java] Tables before deletion Name: /xl/tables/table1.xml - Content Type:
application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml
     [java] Tables before deletion Name: /xl/tables/table2.xml - Content Type:
application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml
     [java] Tables before deletion Name: /xl/tables/table3.xml - Content Type:
application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml

     [java] Tables after deletion Name: /xl/tables/table1.xml - Content Type:
application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml
     [java] Tables after deletion Name: /xl/tables/table3.xml - Content Type:
application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml

Create a new table table and it throws exception as below
org.apache.poi.openxml4j.exceptions.PartAlreadyExistsException: A part with the
name '/xl/tables/table3.xml' already exists : Packages shall not contain
equivalent part names and package implementers shall neither create nor
recognize packages with equivalent part names. [M1.12]

Looks like it tries to re-use table3.xml which already exists.

When I look into the code, this line.
XSSFSheet line 3971
int tableNumber =
getPackagePart().getPackage().getPartsByContentType(XSSFRelation.TABLE.getContentType()).size()
+ 1;

--
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 61543] XSSFTable bug table remove after create

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

Dominik Stadler <[hidden email]> changed:

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

--- Comment #1 from Dominik Stadler <[hidden email]> ---
Please state which exact version of POI you are using and please try to put
your steps into a self-sufficient unit-test so we can actually try to reproduce
the problem on our end.

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