Calculation Element (Microsoft Excel)

Specifies the type of calculation for a PivotTable field or the mode of calculation for a workbook.

Contained In

ExcelWorkbook, PivotField

Remarks

For a PivotTable field, this element contains one of the following string constants specifying the type of calculation: DifferenceFrom, Index, Normal, PercentDifferenceFrom, PercentOf, PercentOfColumn, PercentOfRow, PercentOfTotal, or RunningTotalIn. If this element is not specified, the default value is Normal.

For a workbook, this element contains one of the following string constants:

Constant Description
AutomaticCalculation All dependent formulas are calculated every time a value, formula, or name is changed.
ManualCalculation All open workbooks are calculated when a calculation is requested. The DoNotCalculateBeforeSave element cannot be specified when manual calculation is enabled.
SemiAutomaticCalculation All dependent formulas except data tables are calculated every time a change is made to a value, formula, or name. To calculate data tables, a calculation must be requested.

If this element is not specified, the default value is AutomaticCalculation.

Example

See the example in the ExcelWorkbook element topic.