0

Question about Zss component and Formulas [closed]

asked 2008-12-17 10:28:13 +0800

gganassin gravatar image gganassin flag of Luxembourg
540 6
http://www.hybris.com/

Hi there!

Im currently having much fun using the Zss component in my web app: my goal is to build up a dinamic three-representation of my business data and everithing is goin smoothly.

But now i have to inject a formula into a cell:

int x = 10;
int y = 3;
String formula = "B6+B7";
Cell cell = sheet.getCell(z, y);
cell.setFormula(formula);
*BOOOOOOM*

what am i missing guyz? any tips around? am i just badly formatting my formula's string or using a complete wrong approach to my problem?

delete flag offensive retag edit

The question has been closed for the following reason "the question is answered, right answer was accepted" by gganassin
close date 2013-05-10 14:57:56

1 Reply

Sort by ยป oldest newest

answered 2008-12-18 03:18:58 +0800

PeterKuo gravatar image PeterKuo
481 2

You missed a "=" in String formula = "B6+B7";

 public void setFormula(String formula) {
  if (formula != null && formula.startsWith("=")) {
   formula = formula.substring(1);
  }
  Formula val = new FormulaImpl(formula);
  setValue(val);
 }

link publish delete flag offensive edit

Question tools

Follow

RSS

Stats

Asked: 2008-12-17 10:28:13 +0800

Seen: 186 times

Last updated: Dec 18 '08

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More