Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel formulas in Java

Status
Not open for further replies.

pgmr30

Programmer
Nov 24, 2009
3
US
I am trying to use Scott Klement code to write to Excel file. Have trouble figuring out format for formulas. Need to multiply two cells and put result into a different cell. Anybody has done that?
 
D Cell1 s 10A varying
D Cell2 s 10A varying

/free
//Excel cell names must be used in formulas
Cell1 = hssf_cellname(2:4);//get name for row 2 col 4 (E3)
Cell2 = hssf_cellname(2:5);//get name for row 2 col 5 (F3)
//Place formula for "Cell1 * Cell2" in col 12 of curr row
//Do not include the '=' prior to the formula
hssf_formula(row : 12 : Cell1 + '*' + Cell2 : Numeric0);
/end-free
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top