The title says it all. I will attach a JUnit test case that creates a workbook, adds two tables to the first sheet, removes the first table, and then writes the workbook to build/custom-reports-test. JUnit will pass the test, but when the workbook is opened in Excel it will detect a corrupted workbook, and then delete the second table.
Created attachment 36565 [details] JUnit test case to illustrate bug 63401 This test case creates a workbook, adds two XSSFTables to the first sheet, then removes one of the tables, and writes the workbook to build/custom-reports-test. JUnit will pass the test case, but when Excel 2010 opens the workbook it will detect corruption, and remove the second table.
Created attachment 36638 [details] Initial attempt at a fix I tried to fix this by removing the table also from the parts-array, but Excel still complains about the file needing repair (although it now can actually recover the table). See attached diff for test-case and code-change that I tried.