How to set formulas in cells using Apache POI?

后端 未结 7 1649
慢半拍i
慢半拍i 2021-01-01 09:09

I am currently using Apache POI for Java to set formulas in cells.

But after I run the program and open the Excel file that I created and processed, the cells with t

7条回答
  •  天命终不由人
    2021-01-01 09:20

    You could use this to evaluate the formulas in the workbook:

            // Evaluate all formulas in the sheet, to update their value
        FormulaEvaluator formulaEvaluator = workbook.getCreationHelper().createFormulaEvaluator();
        formulaEvaluator.evaluateAll();
    

提交回复
热议问题