You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Chris Ernenwein <ce...@phtcorp.com> on 2004/06/07 14:47:55 UTC

Question on formulas in HSSF

All,

I tried to put in a couple simple formulas, like count and sum and I cannot
get the spreadsheet to "autocalc" these formulas.  Anybody have a snippet of
working code that produces a correctly working formula?

curCell.setCellType(HSSFCell.CELL_TYPE_FORMULA);
curCell.setCellFormula("COUNTA("+alphabet.charAt(count)+startRow+":"+alphabe
t.charAt(count)+(rowCount)+")");

After viewing the spreadsheet, if you hit F2 on the formula then enter, it
recalcs it.  SO the syntax seems correct.

Any other ideas?

Thanks,
Chris Ernenwein
Senior Software Engineer
http://www.phtcorp.com 
AIM, MSN, Y!: cernenwein

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org