vinod
vinod

Reputation: 1202

How Add a formula(Dynamic value of cell) in Excel Using Apache POI

enter image description here

I have above scenario where i need add sum formula for column C,D,E as total where row can be increased or decreased. I have followed some links but not able find a solution as i know we need specify sum(X1:Xn) value so here i need those value to be dynamic so how can i achieve this. Thanks In advance

Upvotes: 0

Views: 2244

Answers (1)

Kulbhushan Singh
Kulbhushan Singh

Reputation: 625

You can do something like the below:

cell.setCellFormula("SUM(X1:Xn)");

Upvotes: 1

Related Questions