CacheField Class
PivotCache Field.When the object is serialized out as xml, its qualified name is x:cacheField.
Inheritance Hierarchy
System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlCompositeElement
DocumentFormat.OpenXml.Spreadsheet.CacheField
Namespace: DocumentFormat.OpenXml.Spreadsheet
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'Declaration
<ChildElementInfoAttribute(GetType(CacheFieldExtensionList))> _
<ChildElementInfoAttribute(GetType(SharedItems))> _
<ChildElementInfoAttribute(GetType(FieldGroup))> _
<ChildElementInfoAttribute(GetType(MemberPropertiesMap))> _
Public Class CacheField _
Inherits OpenXmlCompositeElement
'Usage
Dim instance As CacheField
[ChildElementInfoAttribute(typeof(CacheFieldExtensionList))]
[ChildElementInfoAttribute(typeof(SharedItems))]
[ChildElementInfoAttribute(typeof(FieldGroup))]
[ChildElementInfoAttribute(typeof(MemberPropertiesMap))]
public class CacheField : OpenXmlCompositeElement
Remarks
The following table lists the possible child types:
SharedItems <x:sharedItems>
FieldGroup <x:fieldGroup>
MemberPropertiesMap <x:mpMap>
CacheFieldExtensionList <x:extLst>
[ISO/IEC 29500-1 1st Edition]
18.10.1.3 cacheField (PivotCache Field)
Represent a single field in the PivotCache. This definition contains information about the field, such as its source, data type, and location within a level or hierarchy. The sharedItems element stores additional information about the data in this field. If there are no shared items, then values are stored directly in the pivotCacheRecords part.
[Example:
<cacheField name="Group" numFmtId="0">
<sharedItems count="3">
<s v="Pacific"/>
<s v="North America"/>
<s v="Europe"/>
</sharedItems>
</cacheField>
end example]
Parent Elements |
---|
cacheFields (§18.10.1.4) |
Child Elements |
Subclause |
---|---|
extLst (Future Feature Data Storage Area) |
§18.2.10 |
fieldGroup (Field Group Properties) |
§18.10.1.30 |
mpMap (Member Properties Map) |
§18.10.1.58 |
sharedItems (Shared Items) |
§18.10.1.90 |
Attributes |
Description |
---|---|
caption (PivotCache Field Caption) |
Specifies the caption of the cache field. The possible values for this attribute are defined by the ST_Xstring simple type (§22.9.2.19). |
databaseField (Database Field) |
Specifies a boolean value that indicates whether this field came from the source database rather having been created by the application. A value of 1 or true indicates the field is from the source database. A value of 0 or false indicates the field was created by the application. [Note: This attribute could be used for a defined grouped or calculated field. In this case, source database fields should precede defined grouped or calculated fields. end note] The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
formula (Calculated Field Formula) |
Specifies the formula for the calculated field. This formula is specified by the end-user. Calculated fields can perform calculations by using the contents of other fields in the PivotTable. In formulas you create for calculated fields or calculated items, you can use operators and expressions as you do in other worksheet formulas. You can use constants and refer to data from the PivotTable, but you cannot use cell references or defined names. You cannot use worksheet functions that require cell references or defined names as arguments, and you cannot use array functions. Further behaviors and restrictions apply to formulas for calculated fields:
For more information about formulas see §18.17 in Formulas. For more information about defined names see §18.2.6 in Workbook. The possible values for this attribute are defined by the ST_Xstring simple type (§22.9.2.19). |
hierarchy (Hierarchy) |
Specifies the hierarchy that this field is part of. The possible values for this attribute are defined by the W3C XML Schema int datatype. |
level (Hierarchy Level) |
Specifies the hierarchy level that this field is part of. The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype. |
mappingCount (Member Property Count) |
Specifies the number of property mappings for this field. The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype. |
memberPropertyField (Member Property Field) |
Specifies a boolean value that indicates whether the field contains OLAP member property information. A value of 1 or true indicates this field contains OLAP member property information. A value of 0 or false indicates this field does not contain OLAP member property information. The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
name (PivotCache Field Name) |
Specifies the name of the cache field. The possible values for this attribute are defined by the ST_Xstring simple type (§22.9.2.19). |
numFmtId (Number Format Id) |
Specifies the number format that is applied to all items in the field. Number formats are written to the styles part. For more information see §18.8.31 in Styles. [Note: Formatting information provided by cell table and by PivotTable need not agree. If the two formats differ, the cell-level formatting takes precedence. If you change the layout of the PivotTable, the PivotTable formatting will then take precedence. end note] The possible values for this attribute are defined by the ST_NumFmtId simple type (§18.18.47). |
propertyName (Property Name) |
Specifies the name of the property if this field is an OLAP property field. The possible values for this attribute are defined by the ST_Xstring simple type (§22.9.2.19). |
serverField (Server-based Field) |
Specifies a boolean value that indicates whether the field is a server-based page field. A value of 1 or true indicates this field is a server-based page field. A value of 0 or false indicates this field is not a server-based page field. This attribute applies to ODBC sources only. The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
sqlType (SQL Data Type) |
Specifies the SQL data type of the field. This attribute stores an ODBC data type and applies to ODBC data sources only. A value is supplied for this attribute only if it is provided to the application. The following are data types supported by ODBC. For a more information, see the ODBC specification.
The possible values for this attribute are defined by the W3C XML Schema int datatype. |
uniqueList (Unique List Retrieved) |
Specifies a boolean value that indicates whether the application was able to get a list of unique items for the field. The attribute only applies to PivotTables that use ODBC and is intended to be used in conjunction with optimization features in the application. [Example: the application can optimize memory usage when populating PivotCache records if it has a list of unique items for a field before all the records are retrieved from ODBC. end example] A value of 1 or true indicates the application was able to get a list of unique values for the field. A value of 0 or false indicates the application was unable to get a list of unique values for the field. The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
[Note: The W3C XML Schema definition of this element’s content model (CT_CacheField) is located in §A.2. end note]
© ISO/IEC29500: 2008.
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.