Bug 63372

Summary: XSSFSheet.createTable corrupts workbook unless setDisplayName is called
Product: POI Reporter: David Gauntt <dmgauntt>
Component: XSSFAssignee: POI Developers List <dev>
Severity: normal    
Priority: P2    
Version: 4.0.x-dev   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: Unit test illustrating problem with createTable

Description David Gauntt 2019-04-22 04:41:36 UTC
Created attachment 36542 [details]
Unit test illustrating problem with createTable

If you add an XSSFTable to an XSSFSheet, and do not call getCTTable.setDisplayName, then when the workbook is opened by Excel 365 the following error message is displayed:

We found a problem with some content in '<filename>'.  Do you want us to try to recover as much as we can? ...

After clicking on Yes, the following information is displayed:

Removed Part: /xl/tables/table1.xml part with XML error.  (Table) Load error. Line 2, column 92.

In the attached unit test, if "runTestKern(false)" is called, the resulting workbook will display the error message when opened by Excel 365.  IF "runTestKern(true)" is called, the error message is not displayed.
Comment 1 David Gauntt 2019-04-22 11:04:03 UTC

*** This bug has been marked as a duplicate of bug 62906 ***