I think its because of the space in the sheet name.. I guess the formula parser doesnt support it... try this with a sheet name without a space... look at TestFormulas and TestFormulaParser in the source for examples.. i dont have a development environment right now so cant test it myself.
Regards - Avik Quoting Dimitri Pissarenko <[EMAIL PROTECTED]>: > Hello! > > I'm writing an application, in which I create an Excel document with > several worksheets. These show different values and their sums. I want > to create an additional worksheet, where only sums of those values are > shown. > > For this purpose, I created this new worksheet and tried to set a > formula in a cell, which "points" exactly to the sum row of the > original worksheet. > > The formula is > > 'Profile B'!N79-'Profile B'!N132 > > ie, the difference between cell N79 in worksheet "Profile B" and cell > N132 in worksheet "Profile B". > > If I enter this formula manually in an Excel document, it works. > > But POI generates following error message > > 2003-11-15 14:59:34,642 ERROR [profile.bsh] - > java.lang.RuntimeException: Cannot Parse, sorry : Integer Expected > at > org.apache.poi.hssf.model.FormulaParser.Abort(FormulaParser.java:172) > at > org.apache.poi.hssf.model.FormulaParser.Expected(FormulaParser.java:179) > at > org.apache.poi.hssf.model.FormulaParser.GetNum(FormulaParser.java:276) > at > org.apache.poi.hssf.model.FormulaParser.Factor(FormulaParser.java:506) > at > org.apache.poi.hssf.model.FormulaParser.Term(FormulaParser.java:545) > at > org.apache.poi.hssf.model.FormulaParser.Expression(FormulaParser.java:596) > at > org.apache.poi.hssf.model.FormulaParser.parse(FormulaParser.java:636) > at > org.apache.poi.hssf.usermodel.HSSFCell.setCellFormula(HSSFCell.java:714) > ... > > Does someone know, how to solve this problem? > > TIA > > Dimitri Pissarenko > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
