my dog learned polymorphism*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Apache HSSF - corrupt excel file" Watch "Apache HSSF - corrupt excel file" New topic
Author

Apache HSSF - corrupt excel file

Sethuraman Ramasubramanian
Greenhorn

Joined: Apr 26, 2009
Posts: 7
Hi,

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Apache HSSF - corrupt excel file
 
Similar Threads
Read a .xls,.xlsx file format using XSSF
creating a log file for my servlet
HWPF POI
Reading word Documents Using JAVA
Reading text in a table from word document