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 2008/05/03 01:06:14 UTC

DO NOT REPLY [Bug 44675] [patch] POI does not distinguish functions with fixed vs variable arguments

https://issues.apache.org/bugzilla/show_bug.cgi?id=44675


Dmitriy Kumshayev <dq...@mail.com> changed:

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




--- Comment #2 from Dmitriy Kumshayev <dq...@mail.com>  2008-05-02 16:06:14 PST ---
setCellFormula("SUM(A1:A2)") produces #VALUE! error in Excel

This started happening since this patch.

HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sh = wb.createSheet("TestSheet");

HSSFRow row1 = sh.createRow(0); 
HSSFCell A1 = row1.createCell((short)0); 
A1.setCellValue(1.);

HSSFRow row2 = sh.createRow(1); 
HSSFCell A2 = row2.createCell((short)0); 
A2.setCellValue(1.);

HSSFRow row3 = sh.createRow(2); 
HSSFCell A3 = row3.createCell((short)0); 
A3.setCellFormula("SUM(A1:A2)");

--------------------------------------------

FuncVarPtg is used to represent SUM function.
FuncVarPtg(String pName, byte pNumOperands) constructor initializes paramClass
with Ptg.CLASS_VALUE while it used to be Ptg.CLASS_REF before this patch.

I am not quite sure about the meaning of this, but when I manually changed it
in debugger to Ptg.CLASS_REF, the problem disappeared.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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