Hi.
I have been using the following code without any problems with poi 1.5:
HSSFRow row;HSSFCell cell;
int i=0;
while((row=sheet.getRow(i++))!=null) {
short fcol=row.getFirstCellNum();
short lcol=row.getLastCellNum();
for(short j=fcol;j<=lcol;j++){
cell=row.getCell(j);
...........
}
}
}
Using it with poi 2.0 I get exception at "cell=row.getCell(j);":
java.lang.IndexOutOfBoundsException
at org.apache.poi.util.IntList.get(IntList.java:387)
at
org.apache.poi.hssf.record.aggregates.ValueRecordsAggregate.constructRecord(ValueRecordsAggregate.java:312)
at
org.apache.poi.hssf.record.aggregates.ValueRecordsAggregate.getCell(ValueRecordsAggregate.java:98)
at org.apache.poi.hssf.model.Sheet.getValueRecord(Sheet.java:557)
at org.apache.poi.hssf.usermodel.HSSFRow.getCell(HSSFRow.java:325)
Excel file was generated with the use of poi 2.0. Exception is thrown at second cell
of the row.
It has just first cell with a filled value. Before throwing exception fcol=0,lcol=12.
What should I do? Thanks.
Andrew Kharchuk