You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Michael Mangeng <mi...@inexess.com> on 2003/04/17 14:37:57 UTC
Duplicates values -> binarytree ?
Hi
I`ve encountered a strange problem...
When i do:
try {
workbook = new HSSFWorkbook(new FileInputStream(targetFile));
} catch (Exception e) {
e.printStackTrace();
}
... the following Exception occours:
java.lang.IllegalArgumentException: Cannot store a duplicate value
("---") in this Map
at org.apache.poi.util.BinaryTree.insertValue(BinaryTree.java:1395)
at org.apache.poi.util.BinaryTree.put(BinaryTree.java:1580)
at
org.apache.poi.hssf.record.SSTRecord.processString(SSTRecord.java:1033)
at
org.apache.poi.hssf.record.SSTRecord.manufactureStrings(SSTRecord.java:960)
at
org.apache.poi.hssf.record.SSTRecord.fillFields(SSTRecord.java:818)
at org.apache.poi.hssf.record.Record.fillFields(Record.java:142)
at org.apache.poi.hssf.record.Record.<init>(Record.java:104)
at org.apache.poi.hssf.record.SSTRecord.<init>(SSTRecord.java:161)
... 36 more
org.apache.poi.hssf.record.RecordFormatException: Unable to construct
record instance, the following exception occured: null
at
org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:259)
at
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:184)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:140)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:175)
I`ve searched the ...poi.util. pkg and discovered that this is a
limitation of the Binarytree implementation...
Yes, the excel table contains these "---" entries in various
columns..... but how can i edit this excel file with POI now?
File is stored with Openoffice 1.0 as "Microsoft Windoes 2000/XP".
greets and thanks for any response
mike