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