poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raendl91 <wagner_rud...@gmx.at>
Subject Parse intersecting name ranges
Date Wed, 17 Apr 2013 10:37:52 GMT
Hi.
I have problems to parse formulas which contain intersecting name ranges. 
For example if I try to parse a formula like
"=SUM((Total_Cost!Jan):(Total_Cost!Apr_))" where Total_Cost, Jan and Apr_
are name ranges which overlap i receive the following exception:

Exception in thread "main" org.apache.poi.ss.formula.FormulaParseException:
Parse error near char 16 'J' in specified formula 'SUM((Total_Cost
Jan):(Total_Cost Apr_))'. Expected ')'
	at org.apache.poi.ss.formula.FormulaParser.expected(FormulaParser.java:219)
	at org.apache.poi.ss.formula.FormulaParser.Match(FormulaParser.java:251)
	at
org.apache.poi.ss.formula.FormulaParser.parseSimpleFactor(FormulaParser.java:1108)
	at
org.apache.poi.ss.formula.FormulaParser.percentFactor(FormulaParser.java:1079)
	at
org.apache.poi.ss.formula.FormulaParser.powerFactor(FormulaParser.java:1066)
	at org.apache.poi.ss.formula.FormulaParser.Term(FormulaParser.java:1426)
	at
org.apache.poi.ss.formula.FormulaParser.additiveExpression(FormulaParser.java:1526)
	at
org.apache.poi.ss.formula.FormulaParser.concatExpression(FormulaParser.java:1510)
	at
org.apache.poi.ss.formula.FormulaParser.comparisonExpression(FormulaParser.java:1467)
	at
org.apache.poi.ss.formula.FormulaParser.Arguments(FormulaParser.java:1051)
	at org.apache.poi.ss.formula.FormulaParser.function(FormulaParser.java:936)
	at
org.apache.poi.ss.formula.FormulaParser.parseNonRange(FormulaParser.java:558)
	at
org.apache.poi.ss.formula.FormulaParser.parseRangeable(FormulaParser.java:429)
	at
org.apache.poi.ss.formula.FormulaParser.parseRangeExpression(FormulaParser.java:268)
	at
org.apache.poi.ss.formula.FormulaParser.parseSimpleFactor(FormulaParser.java:1119)
	at
org.apache.poi.ss.formula.FormulaParser.percentFactor(FormulaParser.java:1079)
	at
org.apache.poi.ss.formula.FormulaParser.powerFactor(FormulaParser.java:1066)
	at org.apache.poi.ss.formula.FormulaParser.Term(FormulaParser.java:1426)
	at
org.apache.poi.ss.formula.FormulaParser.additiveExpression(FormulaParser.java:1526)
	at
org.apache.poi.ss.formula.FormulaParser.concatExpression(FormulaParser.java:1510)
	at
org.apache.poi.ss.formula.FormulaParser.comparisonExpression(FormulaParser.java:1467)
	at
org.apache.poi.ss.formula.FormulaParser.unionExpression(FormulaParser.java:1447)
	at org.apache.poi.ss.formula.FormulaParser.parse(FormulaParser.java:1568)
	at org.apache.poi.ss.formula.FormulaParser.parse(FormulaParser.java:176)

Is the Parser just not able to parse such formulas or am I doing something
wrong? 

Rudi



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Parse-intersecting-name-ranges-tp5712565.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Mime
View raw message