You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2018/05/14 14:03:12 UTC

[Bug 62373] New: #VALUE! result from FREQUENCY formula

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

            Bug ID: 62373
           Summary: #VALUE! result from FREQUENCY formula
           Product: POI
           Version: unspecified
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
          Assignee: dev@poi.apache.org
          Reporter: skarjones@gmail.com
  Target Milestone: ---

The following formula is returning #VALUE! when I open the spreadsheet in
Excel: 
setCellFormula("SUMPRODUCT(--(FREQUENCY(MATCH(" + rangeString + "," +
rangeString + ",0),ROW(" + rangeString + ")-ROW(" + colString +
finalFirstDataRowIndex +  ")+1)>0))");

If I go into the cell and back out, it calculates properly. A colleague tried
OpenOffice, and it worked fine. I added setForceFormulaRecalculation(true), but
it didn't help. Clicking the Recalculate All button in Excel also didn't
replace the #VALUE! with the proper calculation. Only going into and back out
of the cell worked. I tried calculating the formula in Java before creating the
workbook, but FREQUENCY is not supported.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 62373] #VALUE! result from FREQUENCY formula

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62373

Nick Burch <ap...@gagravarr.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Nick Burch <ap...@gagravarr.org> ---
Frequency looks to be a function that can run on either as a "normal" function
on a range (returning a single value), or as as "array" function (returning
multiple values)

I *think* that adding support for the non-array version ought to be fairly easy
to do, if you want to have a try. Have a read of
http://poi.apache.org/spreadsheet/formula.html then
http://poi.apache.org/spreadsheet/eval.html then
http://poi.apache.org/spreadsheet/eval-devguide.html , next
http://home.apache.org/~yegor/apachecon_us2010/Evaluation_Of_Excel_Formulas_In_POI.pptx
, implement the function, then finally http://poi.apache.org/guidelines.html
for contributing it back!

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 62373] #VALUE! result from FREQUENCY formula

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62373

Yegor Kozlov <ye...@dinom.ru> changed:

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

--- Comment #2 from Yegor Kozlov <ye...@dinom.ru> ---
I checked in support for FREQUENCY in r1844238. Please test with the latest
build from trunk.

If evaluation still doesn't work then attach a sample spreadsheet and Java code
to reproduce the problem. Not implemented FREQUENCY might not be the only
problem.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org