also, this is now fixed in the SVN trunk. So if you are building from source, getting the latest will solve the problem as well (ie. you can specify the formula with the missing arg and it will work without the exception).
~ amol --- [EMAIL PROTECTED] wrote: > I agree. In this case specifically, you could > substitute the missing else with a 0 and no > exception > will be thrown. > > ~ amol > > --- Sebastian Frehmel <[EMAIL PROTECTED]> > wrote: > > > I would say you don't have an else-statement in > your > > IFs. If "IF" > > evaluates to false, the element in the "SUM" list > > ist undefined or > > something. That's why you get "Integer expected". > > > > don_salieri schrieb: > > > Hi friends, > > > i have a problem, if i create this formula into > > one cell: > > > > > > String somma = > > > > > > "SUM(IF(A1=\"T\";B2+1;);IF(A2=\"T\";B2+1;);IF(A3=\"T\";B2+1;))"; > > > > > row.createCell((short)0).setCellFormula(somma); > > > > > > > > > when i run the program i obtain this exception: > > > > > > Exception in thread "main" > > java.lang.RuntimeException: Cannot Parse, > > > sorry : > > > Integer Expected > > > at > > > > > > org.apache.poi.hssf.model.FormulaParser.Abort(FormulaParser.java > > > :117) > > > at > > org.apache.poi.hssf.model.FormulaParser.Expected( > > > FormulaParser.java:124) > > > at > > > > > > org.apache.poi.hssf.model.FormulaParser.GetNum(FormulaParser.java > > > :239) > > > at > > > > > > org.apache.poi.hssf.model.FormulaParser.Factor(FormulaParser.java > > > :479) > > > at > > > org.apache.poi.hssf.model.FormulaParser.Term(FormulaParser.java > > > :548) > > > at > > > org.apache.poi.hssf.model.FormulaParser.Expression( > > > FormulaParser.java:596) > > > at > > org.apache.poi.hssf.model.FormulaParser.Arguments( > > > FormulaParser.java:453) > > > at > > org.apache.poi.hssf.model.FormulaParser.function( > > > FormulaParser.java:315) > > > at > > > > > > org.apache.poi.hssf.model.FormulaParser.Ident(FormulaParser.java > > > :265) > > > at > > > > > > org.apache.poi.hssf.model.FormulaParser.Factor(FormulaParser.java > > > :474) > > > at > > > org.apache.poi.hssf.model.FormulaParser.Term(FormulaParser.java > > > :548) > > > at > > > org.apache.poi.hssf.model.FormulaParser.Expression( > > > FormulaParser.java:596) > > > at > > org.apache.poi.hssf.model.FormulaParser.Arguments( > > > FormulaParser.java:443) > > > at > > org.apache.poi.hssf.model.FormulaParser.function( > > > FormulaParser.java:315) > > > at > > > > > > org.apache.poi.hssf.model.FormulaParser.Ident(FormulaParser.java > > > :265) > > > at > > > > > > org.apache.poi.hssf.model.FormulaParser.Factor(FormulaParser.java > > > :474) > > > at > > > org.apache.poi.hssf.model.FormulaParser.Term(FormulaParser.java > > > :548) > > > at > > > org.apache.poi.hssf.model.FormulaParser.Expression( > > > FormulaParser.java:596) > > > at > > > > > > org.apache.poi.hssf.model.FormulaParser.parse(FormulaParser.java > > > :700) > > > at > > > org.apache.poi.hssf.usermodel.HSSFCell.setCellFormula( > > > HSSFCell.java:678) > > > at pretest.Main.main(Main.java:66) > > > > > > Why and i can solve it?....thanks > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > Mailing List: > > http://jakarta.apache.org/site/mail2.html#poi > > The Apache Jakarta Poi Project: > > http://jakarta.apache.org/poi/ > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > Mailing List: > http://jakarta.apache.org/site/mail2.html#poi > The Apache Jakarta Poi Project: > http://jakarta.apache.org/poi/ > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
