FormulaParser currently throws an "Expected" if a " " is in between ()'s for instance. SUM( A1:A2 ) should be acceptable as should SUM(A1:A2) -- currently onlt the latter is. Basically any whitespace not in " " or ' ' should be ignored however SUM(A 1:A2) should be illegal. Excel can acutally preserve these spaces. (we should try and do that ) Excel chokes on SUM (A1:A2) as I guess SUM( is the token and ) is the end tag.
The attached tests work for me. Please supply me with a failing testcase. Testing org.apache.poi.hssf.record.formula.FormulaParser .... Time: 0.181 OK (4 tests)
Created attachment 1753 [details] Working test case
do AVERAGE( A1:A2 ) or SUM( A1:A2 ) with no other elements and it chokes.
I've commited the test for formula parser with the case you suggest. Can u pls run it and tell me the results??
No testcases show aberrant behaviour. Setting to fixed, reopen with a failing testcase.