Bug 46729 - maxParams for excel functions in XSSF should be 255
Summary: maxParams for excel functions in XSSF should be 255
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.2-FINAL
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-18 00:02 UTC by Maksym Symonov
Modified: 2009-04-18 00:16 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maksym Symonov 2009-02-18 00:02:37 UTC
maxParams value in is functionMetadata.txt file in org.apache.poi.hssf.record.formula.function package is limited for excel functions to 30 though max parameters that as example SUM function accepts is 255.
Comment 1 Josh Micich 2009-02-18 10:14:28 UTC
30 is correct for HSSF.  FormulaParser probably needs a flag to distinguish whether it is parsing for XSSF or HSSF.  In this case, the alternate 'maxParams' may be selected at line 624 of FormulaParser:
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/FormulaParser.java?annotate=744749
Comment 2 Yegor Kozlov 2009-04-18 00:16:32 UTC
Fixed in r766251.

The folllowing functions can now take 255 args in XSSF:
 
COUNT, SUM, AVERAGE, MIN, MAX, NPV, STDEV, AND, OR, VAR, CHOOSE, COUNTA, PRODUCT, STDEVP, VARP, MEDIAN, SUMPRODUCT, AVEDEV, DEVSQ, GEOMEAN, HARMEAN, SUMSQ, KURT, SKEW, MODE, CONCATENATE, SUBTOTAL, GETPIVOTDATA, AVERAGEA, MAXA, MINA, STDEVPA, VARPA, STDEVA, VARA

Regards,
Yegor