Bug 45206

Summary: sumproduct formula returning #VALUE
Product: POI Reporter: geo <kayamkulamkochunni>
Component: HSSFAssignee: POI Developers List <dev>
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   

Description geo 2008-06-14 17:12:40 UTC
The following example is not an array product. When you create an excel file and use the following forumula, we see a #VALUE. However if you click on the cell and press enter, the number gets populated. I am guessing this is some kind of bug related to the unique way this formula works. 

Comment 1 Josh Micich 2008-06-15 15:28:36 UTC
Looks like this was fixed with bug 45060. This bug is visible in 3.1-beta2 but the fix should be available in 3.1-final.  It is also available in svn trunk.

Just to be sure, the existing unit test was modified (svn r668014) to add this example. Here is a trace from successful execution of the new test case:

  token[0] org.apache.poi.hssf.record.formula.Area3DPtg [sheetIx=0 ! C3:C751] A
  token[1] org.apache.poi.hssf.record.formula.Ref3DPtg [sheetIx=0 ! F22] A
  token[4] org.apache.poi.hssf.record.formula.Area3DPtg [sheetIx=0 ! D3:D751] A
  token[5] org.apache.poi.hssf.record.formula.Ref3DPtg [sheetIx=0 ! G22] A
  token[9] org.apache.poi.hssf.record.formula.Area3DPtg [sheetIx=0 ! AF3:AF751] A
  token[10] org.apache.poi.hssf.record.formula.FuncVarPtg [SUMPRODUCT nArgs=2] V

In 3.1-beta2, tokens 0,1,4,5 are erroneously encoded as operand class 'V'

*** This bug has been marked as a duplicate of bug 45060 ***