posted 19 years ago
Hi,
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..
java.lang.ClassCastException
at java.util.TreeMap.compare(TreeMap.java:1081)
at java.util.TreeMap.put(TreeMap.java:459)
at org.apache.poi.hssf.record.aggregates.ValueRecordsAggregate.insertCell(ValueRecordsAggregate.java:102)
at org.apache.poi.hssf.record.aggregates.ValueRecordsAggregate.construct(ValueRecordsAggregate.java:167)
at org.apache.poi.hssf.model.Sheet.createSheet(Sheet.java:224)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:216)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:174)
Thanks In Advance
Chetan