Bug 60967 - Excel file is corrupted and the complete data is deleted from file
Summary: Excel file is corrupted and the complete data is deleted from file
Status: RESOLVED DUPLICATE of bug 60102
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-11 06:32 UTC by Saikiran
Modified: 2017-04-11 16:47 UTC (History)
1 user (show)



Attachments
Please find the attachment for reference (205.80 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2017-04-11 06:32 UTC, Saikiran
Details

Note You need to log in before you can comment on or make changes to this bug.
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 ***