The moose likes Java in General and the fly likes Apache HSSF - corrupt excel file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Apache HSSF - corrupt excel file" Watch "Apache HSSF - corrupt excel file" New topic

Apache HSSF - corrupt excel file

Sethuraman Ramasubramanian

Joined: Apr 26, 2009
Posts: 7

I have an issue when sometimes reading an excel file is corrupting it! I am reading the excel file using the apache HSSF library. This is the code I use to read the excel-
The below method is used to open the excel:

I then read cell contents using the below method:

I dont write anything to the excel sheet. So there is no way of corrupting it. Unless I need to close the sheet or the workbook somehow. I am unable to find a close in any of these classes. Do we have to close what we opened? How do I go about doing that? The excel does not get corrupted always. Occasionaly it does, I am not able to consistently replicate it.
I agree. Here's the link:
subject: Apache HSSF - corrupt excel file
It's not a secret anymore!