<changes>
<release version="3.9-beta1" date="2012-??-??">
+ <action dev="poi-developers" type="fix">53101 - fixed evaluation of SUM over cell range > 255</action>
<action dev="poi-developers" type="fix">49529 - avoid exception when cloning sheets with no drawing records and initialized drawing patriarch</action>
</release>
<release version="3.8-FINAL" date="2012-03-26">
public ValueEval getRelativeValue(int relativeRowIndex, int relativeColumnIndex) {
- int rowIx = (relativeRowIndex + getFirstRow() ) & 0xFFFF;
- int colIx = (relativeColumnIndex + getFirstColumn() ) & 0x00FF;
+ int rowIx = (relativeRowIndex + getFirstRow() ) ;
+ int colIx = (relativeColumnIndex + getFirstColumn() ) ;
return _evaluator.getEvalForCell(rowIx, colIx);
}
}
}
+ /**
+ * Bug 53101:
+ */
+ public void test5301(){
+ Workbook workbook = XSSFTestDataSamples.openSampleWorkbook("53101.xlsx");
+ FormulaEvaluator evaluator =
+ workbook.getCreationHelper().createFormulaEvaluator();
+ // A1: SUM(B1: IZ1)
+ double a1Value =
+ evaluator.evaluate(workbook.getSheetAt(0).getRow(0).getCell(0)).getNumberValue();
+
+ // Assert
+ assertEquals(259.0, a1Value, 0.0);
+
+ // KY: SUM(B1: IZ1)
+ double ky1Value =
+ evaluator.evaluate(workbook.getSheetAt(0).getRow(0).getCell(310)).getNumberValue();
+
+ // Assert
+ assertEquals(259.0, a1Value, 0.0);
+ }
+
}