Editing a XSSFTable without header leads to a corrupted x Steps to reproduce: 1) Create a XLSX with a XSSFTable and remove / hide the header. 2) Use Apache POI to open the XLSX file and add a few lines to the table 3) Adjust the AreaReference to cover all added data 4) Write XLSX and open in Excel The method XSSFTable.updateHeaders() always updates the table headers regardless of getHeaderRowCount(). Therefore it tries to write the first row of data into the header names. Suggestion for a fix: XSSFTable::updateHeaders, line 821: Extend the existing "if" with a check for getHeaderRowCount() > 0 << if (row != null && row.getCTRow().validate()) { >> if (row != null && row.getCTRow().validate() && getHeaderRowCount() > 0) {
Can you provide the minimal java-code to reproduce this to be able to add a test along a fix?