利用poi来设置单元格公式

需求:利用poi来设置公式

1、sheet对象

sheet.setForceFormulaRecalculation(true);  //设为true

2、

Cell.setCellFormula(“SUM(G3,G4,G5,G6,G7,G8,G9,G10,G11,G12,G13,G14,G15,G16,G17,G18,G19,G20)”); //单元格设置公式

**主要设置计算公式时,要把=号去掉

原文地址:https://www.cnblogs.com/wwssgg/p/15060940.html