• Post Reply Bookmark Topic Watch Topic
  • New Topic

Apache HSSF - corrupt excel file  RSS feed

Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!