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.
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 ***