OpenXML SDK: Make Excel recalculate formula

前端 未结 5 432
旧巷少年郎
旧巷少年郎 2020-11-30 06:15

I update some cells of an Excel spreadsheet through the Microsoft Office OpenXML SDK 2.0. Changing the values makes all cells containing formula that depend on the changed c

5条回答
  •  醉话见心
    2020-11-30 06:35

    spreadSheet.WorkbookPart.Workbook.CalculationProperties.ForceFullCalculation = true;
    spreadSheet.WorkbookPart.Workbook.CalculationProperties.FullCalculationOnLoad = true;
    

    Works for me!

提交回复
热议问题