https://issues.apache.org/bugzilla/show_bug.cgi?id=56820
Bug ID: 56820
Summary: Negative row index exception when recursively
evaluating ADDRESS with ROW()-1 twice inside an IF
Product: POI
Version: 3.10-FINAL
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
Assignee: [email protected]
Reporter: [email protected]
Created attachment 31877
--> https://issues.apache.org/bugzilla/attachment.cgi?id=31877&action=edit
LineChart example showing the case ROW()-1 which fails
Usually I need to combine the Excel functions: INDIRECT, ADDRESS, ROW and
COLUMN in order to avoid reference problems when deleting rows in columns with
formulas like:
IF(INDIRECT(ADDRESS(ROW()-1, COLUMN())) > 0, INDIRECT(ADDRESS(ROW()-1,
COLUMN())), 0)
Here we check if the value of the cell before the current row is valid (in this
case greater than zero) and if so we return that value.
This works ok on Excel but when evaluating in POI I get an exception with
message: "row index may not be negative", this only happens with rows when
ROW()-1 not when COLUMN()-1. I attached two eclipse projects with a
modification of de LineChart example showing the case with ROW()-1 (Failure)
and the case with COLUMN()-1 (Pass)
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]