|Summary:||Conditional Format rule evaluation calculates relative references incorrectly|
|Product:||POI||Reporter:||Greg Woolsey <gwoolsey>|
|Component:||SS Common||Assignee:||POI Developers List <dev>|
|Bug Depends on:|
Description Greg Woolsey 2019-03-16 00:26:34 UTC
I apparently missed this when I implemented conditional format evaluation. One of the test files even showed the problem, I just wasn't checking the right cells. Issue 1, when adjusting formulas for relative references, the calculation is using the full target row/column rather than calculating an offset from the region top-left corner. Issue 2, Excel appears to specify that if a rule applies to multiple regions, relative references are calculated from the top-left-most cell in any region, not the one containing the current target cell, as is being passed currently from the rule.
Comment 1 Greg Woolsey 2019-03-16 00:27:35 UTC
Fixing the offset calculation and passing the top-left-most region rather than the region matching the current cell fixed these cases. I've augmented unit tests to check for them to avoid future regressions.