I am using Apache POI and Java 8 to generate excel from a existing template which has multiple sheets in it. This is a simple JavaFX based Desktop application which reads the excel file template and deletes sheets based on user input. For some reason when my code deletes a particular sheet I get the following error when I try to open the excel file after my program completes creating the Excel file:
We found a problem with some content in xyz.xlsm. Do you want us to try to recover as much as we can? If you trust the source of this workbook, click Yes.
Errors were detected in file 'C:\LTDrive2_4\Excel\TwoPieceOBS_2019_08_15_12_01_33.xlsm'
removedRecords:
Removed Records: Table from /xl/tables/table79.xml part (Table)
Removed Records: Table from /xl/tables/table103.xml part (Table)