-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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?
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); }
Asked: 2008-12-17 10:28:13 +0800
Seen: 186 times
Last updated: Dec 18 '08