CalculationProperties Class
Calculation Properties.When the object is serialized out as xml, its qualified name is x:calcPr.
Inheritance Hierarchy
System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlLeafElement
DocumentFormat.OpenXml.Spreadsheet.CalculationProperties
Namespace: DocumentFormat.OpenXml.Spreadsheet
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'Declaración
Public Class CalculationProperties _
Inherits OpenXmlLeafElement
'Uso
Dim instance As CalculationProperties
public class CalculationProperties : OpenXmlLeafElement
Remarks
[ISO/IEC 29500-1 1ª edición]
18.2.2 calcPr (Calculation Properties)
This element defines the collection of properties the application uses to record calculation status and details. Calculation is the process of computing formulas and then displaying the results as values in the cells that contain the formulas.
[Example:
<calcPr calcId="122211" calcMode="auto" refMode="R1C1" iterate="1"
fullPrecision="0"/>
end example]
Parent Elements |
---|
workbook (§18.2.27) |
Attributes |
Description |
---|---|
calcCompleted (Calc Completed) |
Specifies a boolean value that determines whether workbook data was recalculated before the workbook was saved. A value of 1 or true indicates recalculation was completed before save. A value of 0 or false indicates that recalculation was not completed before save. The default value for this attribute is true. The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
calcId (Calculation Id) |
Specifies the version of the calculation engine used to calculate values in the workbook. When you open a workbook created in the current version, the application recalculates only the formulas that depend on cells that have changed. When you open a workbook that was created in an earlier version of the application, all the formulas in the workbook— those that depend on cells that have changed and those that do not— are recalculated. This ensures that the workbook is fully optimized for the current application version. The value for calcID depends on the application. SpreadsheetML defaults form [version][build], where [version] refers to the version of the application, and [build] refers to the build of the application when the calculation engine changed. [Example:
end example] The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype. |
calcMode (Calculation Mode) |
Specifies when the application should calculate formulas in the workbook. The default value for this attribute is "auto." The possible values for this attribute are defined by the ST_CalcMode simple type (§18.18.4). |
calcOnSave (Calculate On Save) |
Specifies a boolean value that indicates whether the application recalculates values when the workbook is saved. A value of 1 or true indicates recalculation is performed when the workbook is saved. A value of 0 or false indicates recalculation is not performed when the workbook is saved. The default value for this attribute is true. The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
concurrentCalc (Concurrent Calculations) |
Specifies a boolean value that indicates whether concurrent calculation processes are enabled for this workbook. A value of on, 1, or true indicates concurrent calculations are enabled in this workbook. A value of 0 or false indicates concurrent calculations are not enabled. The default value for this attribute is true. The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
concurrentManualCount (Concurrent Thread Manual Count) |
Specifies the count of concurrent calculation processes manually set by the user. If omitted, the count is set automatically by the application. The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype. |
forceFullCalc (Force Full Calculation) |
Specifies a boolean value that indicates whether the application performs a full recalculation when one was not indicated by other calculation properties. This attribute allows the application to expose mechanisms in the user interface that give users the ability to trigger when full recalculations take place. A value of 1 or true indicates the application performs a full recalculation of the workbook. A value of 0 or false indicates the application does not perform a full recalculation of the workbook. The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
fullCalcOnLoad (Full Calculation On Load) |
Specifies a boolean value that indicates whether the application shall perform a full recalculation when the workbook is opened. After load and successful calculation, the application should set this value to false. The application should set this value to true when cell formulas or values are modified by another process while the application has the workbook opened. A value of 1 or true indicates the application performs a full recalculation of workbook values when the workbook is opened. A value of 0 or false indicates the application does not perform a full recalculation when the workbook is opened. [Note: If manual calcMode is true, then a full recalculation does not performed on load, even when this attribute is set. end note] The default value for this attribute is false. The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
fullPrecision (Full Precision Calculation) |
Specifies a boolean that indicates the precision the application uses when performing calculations in the workbook. Full precision means that the application uses the entire value(s) stored in cells referenced by the formula to perform the calculation. [Example: If two cells each contain the value 10.005 and the cells are formatted to display values in currency format, the value $10.01 is displayed in each cell. If you add the two cells together, the result is $20.01 because the application adds the stored values 10.005 and 10.005, not the displayed values. You can change the precision of calculations so that the application uses the displayed value instead of the stored value when it recalculates formulas. For the above example, if fullPrecision is false, then the result must be $20.02, because each cell shows $10.01, so those are the values to be added. Furthermore, when fullPrecision is false, the calculated value as displayed must be saved to file. end example] A value of 1 or true indicates the application uses the stored values of the referenced cells when performing calculations. A value of 0 or false indicates the application uses the display values of the referenced cells when performing calculations. The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
iterate (Calculation Iteration) |
Specifies a boolean value that indicates whether the application should attempt to calculate formulas that contain circular references. A circular reference is a formula that refers to the cell— either directly or indirectly— that contains the formula. If a formula refers back to one of its own cells, you shall determine how many times the formula should recalculate. A value of on, 1, or true indicates the application should attempt to calculate circular references. The calculation engine performs iterative iterateCount calculations to before stopping. A value of 0 or false indicates that the application should not attempt to calculate formulas with circular references. The calculation engine stops on the first iteration when it encounters a circular references. The default value for this attribute is false. The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
iterateCount (Iteration Count) |
Specifies the number of iterations the calculation engine attempts when calculating a workbook with circular references, when iterate is true. The default value for this attribute is 100. The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype. |
iterateDelta (Iterative Calculation Delta) |
Specifies a double that contains the maximum change for iterative calculations. The application stops calculating after iterateCount iterations or after all values in the circular reference change by less than iterateDelta between iterations, whichever comes first. The default value for this attribute is "0.001" The possible values for this attribute are defined by the W3C XML Schema double datatype. |
refMode (Reference Mode) |
Specifies the reference style for this workbook. Instead of using letters for columns and numbers for rows ("A1"), this option enables using numbers for both rows and columns. Cells are then referred to in this format: R1C1. The default value for this attribute is "A1." The possible values for this attribute are defined by the ST_RefMode simple type (§18.18.64). |
[Note: The W3C XML Schema definition of this element's content model (CT_CalcPr) is located in §A.2. end note]
© ISO/IEC29500: 2008. Los extractos anteriores han sido traducidos del inglés al español por Microsoft (o algunos de sus agentes) e ISO no asume ningún tipo de responsabilidad por dichas traducciones.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.