https://bz.apache.org/bugzilla/show_bug.cgi?id=61468

Greg Woolsey <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #3 from Greg Woolsey <[email protected]> ---
Fixed in r1806623.

The table syntax evaluation is incorrectly assuming a table footer row now,
when there isn't one, and the last row's value is left out of the SUM()
calculation.

It turns out this is because 

org.apache.poi.ss.formula.FormulaParser.ParseStructuredReference(String)

makes the incorrect API assumption noted in the JavaDocs recently added for
XSSFTable.isHasTotalsRow():

Note: This is misleading. The Spec indicates this is true if the totals row has
_ever_ been shown, not whether or not it is currently displayed. Use
getTotalsRowCount() > 0 to decide whether or not the totals row is visible.

I have no idea why MS thought this was helpful or desirable behavior, but this
is experimentally exactly how Excel uses this field, per the OOXML spec.

All POI callers of isHasTotalsRow() have been updated to use
getTotalsRowCount() instead.  this failing file has been added as a unit test,
and now passes.

-- 
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]

Reply via email to