my dog learned polymorphism*
The moose likes I/O and Streams and the fly likes ClassCastExcepiton Using POI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "ClassCastExcepiton Using POI" Watch "ClassCastExcepiton Using POI" New topic

ClassCastExcepiton Using POI


Joined: Aug 13, 2002
Posts: 15

I am reading an excel file using POI api I am getting Classcast exception for the below line..

HSSFWorkbook wb1 = new HSSFWorkbook();
POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream(filename);

Below is the Excepiton I am getting ..Please let me know if anybody has comeacross this type of error and any solution to the same..

at java.util.TreeMap.put(
at org.apache.poi.hssf.record.aggregates.ValueRecordsAggregate.insertCell(
at org.apache.poi.hssf.record.aggregates.ValueRecordsAggregate.construct(
at org.apache.poi.hssf.model.Sheet.createSheet(
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(

Thanks In Advance


Thanks<br />chets
I agree. Here's the link:
subject: ClassCastExcepiton Using POI
Similar Threads
reading password protected excel sheet
Error while trying to construct excel sheet..!
POI- Exception
hassle with jakarta poi
How to read excel file of 2MB and having around 200 sheets