设置工作簿的公式计算模式
Contents
[
Hide
]
Microsoft Excel允许您设置公式计算模式,即公式计算的方式。有三种可能的值:
- 自动 - 每当有变更时重新计算,并且每次打开工作簿时。
- 自动除数据表外 - 每当有变更时重新计算,但是不包括数据表。
- 手动 - 仅当用户通过按F9或CTRL+ALT+F9明确请求时,或者保存工作簿时重新计算。
在Microsoft Excel中设置公式计算模式:
- 选择公式然后计算选项。
- 选择其中一个选项。
Aspose.Cells还允许使用FormulaSettings.CalculationMode 模式属性设置公式计算模式。您可以将其分配给CalcModeType 枚举,该枚举具有以下值之一:
- CalcModeType.Automatic
- CalcModeType.AutomaticExceptTable
- CalcModeType.Manual
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | |
// Create a workbook | |
Workbook workbook = new Workbook(); | |
// Set the Formula Calculation Mode to Manual | |
workbook.Settings.FormulaSettings.CalculationMode = CalcModeType.Manual; | |
// Save the workbook | |
workbook.Save(dataDir + "output_out.xlsx", SaveFormat.Xlsx); |