You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Vikrant <vi...@gmail.com> on 2008/11/10 15:09:03 UTC
FormulaParse Exception - while setting Cell Formula.
Hi,
I am trying to evaluate the value of Cell having complex formula with names.
Since names are not yet supported by POI(correct me if I am wrong), I tried the
work around of replacing the 'names' with their value in the formula, when I
again try to set the cell formula "cell.setCellFormula(formula)" I get the
following error.
org.apache.poi.ss.formula.FormulaParser$FormulaParseException: Parse error near
char 71 ':' in specified formula
'IF(ISERROR(VLOOKUP("ASDAS",INDIRECT(CONCATENATE("D3:D",2+5)):F7,2,FALSE)),"",
VLOOKUP("AASDA",INDIRECT(CONCATENATE("D3:D",2+5)):F7,2,FALSE))'.
Expected ',' or ')'.
Am I missing on something?
Do I need to do validation of the resultant formula before setting the value.
I am using POI 3.1FINAL and also tried using poi-3.5-beta4-20081110.
Same error.
Any help is appreciated.
Thanks in advance,
Vikrant.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: FormulaParse Exception - while setting Cell Formula.
Posted by Nick Burch <ni...@torchbox.com>.
On Mon, 10 Nov 2008, Vikrant wrote:
> Since names are not yet supported by POI(correct me if I am wrong)
Named ranges are supported just fine by poi:
http://poi.apache.org/hssf/quick-guide.html#NamedRanges
> org.apache.poi.ss.formula.FormulaParser$FormulaParseException: Parse error near
> char 71 ':' in specified formula
> 'IF(ISERROR(VLOOKUP("ASDAS",INDIRECT(CONCATENATE("D3:D",2+5)):F7,2,FALSE)),"",
> VLOOKUP("AASDA",INDIRECT(CONCATENATE("D3:D",2+5)):F7,2,FALSE))'.
> Expected ',' or ')'.
Are you sure your formula is really valid? Try pasting the exact same
thing into excel, and check that's happy with it
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org