|Summary:||Excel file is corrupted and the complete data is deleted from file|
|Component:||XSSF||Assignee:||POI Developers List <dev>|
|Attachments:||Please find the attachment for reference|
Description Saikiran 2017-04-11 06:32:51 UTC
Created attachment 34904 [details] Please find the attachment for reference Scenarion: Combine the data from cell A and cell B into cell C Issue: Excel file is corrupted and the complete data is deleted from file. Description: Here i did the wrong way of implementation, I have used "for loop" to copy the data from cell A& B to cell C Here i have closed the Excel file inside the for loop, so after the insertion of first row it is closing the workbook "ExcelWBook.close();" Observation: By this wrong way of implementation the entire file is corrupted and it the data is deleted from file. * By the wrong way of implementation, it should throw the error and it should contains the existing data.
Comment 1 Javen O'Neal 2017-04-11 16:47:12 UTC
Workbooks are just like most other Closeable resources: you cannot operate on them after closing them. Closing this as a duplicate since we have another bug open for improving error messages when operating on a workbook after wb.close() has been called. *** This bug has been marked as a duplicate of bug 60102 ***