[Table of Contents] [docx version]

SpreadsheetML Reference Material - Table of Contents

dataField (Data Field Item)

Represents a field from a source list, table, or database that contains data that is summarized in a PivotTable.

A data field represents data that's derived from a field in the source list or database. The Sport field, for example, might come from a column in the source list that's labeled Sport and contains the names of various sports (Golf, Tennis) for which the source list has sales figures. Source data can be taken from an SpreadsheetML list or range, an external database or cube, or another PivotTable. Data fields use summary functions to combine values from the underlying source data. You can also use custom calculations to compare data values, or add your own formulas that use elements of the report or other worksheet data.

[Example:

<dataFields count="1">
<dataField name="Sum of Sales Amount" fld="25" baseField="0" baseItem="0"/>
</dataFields>

end example]

Parent Elements

dataFields3.10.1.23)

 

Child Elements

Subclause

extLst (Future Feature Data Storage Area)

§3.2.10

 

Attributes

Description

baseField ('Show Data As' Base Field)

Specifies the index to the base field when the ShowDataAs calculation is in use.

 

The possible values for this attribute are defined by the XML Schema int datatype.

baseItem ('Show Data As' Base Setting)

Specifies the index to the base item when the ShowDataAs calculation is in use.

 

The possible values for this attribute are defined by the XML Schema unsignedInt datatype.

fld (Field)

Specifies the index to the field (<r>) in the pivotCacheRecords part that this data item summarizes.

 

The possible values for this attribute are defined by the XML Schema unsignedInt datatype.

name (Data Field Name)

Specifies the name of the data field.

 

The possible values for this attribute are defined by the ST_Xstring simple type (§3.18.96).

numFmtId (Number Format Id)

Specifies the index to the number format applied to this data field. Number formats are written to the styles part. See the Styles section(§3.8) for more information on number formats.

 

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 the PivotTable, the PivotTable formatting will then take precedence.

 

The possible values for this attribute are defined by the ST_NumFmtId simple type (§3.18.49).

showDataAs (Show Data As Display Format)

Specifies the display format for this data field.

 

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 the PivotTable, the PivotTable formatting will then take precedence.

 

The possible values for this attribute are defined by the ST_ShowDataAs simple type (§3.18.72).

subtotal (Subtotal)

Specifies the aggregation function that applies to this data field.

 

The possible values for this attribute are defined by the ST_DataConsolidateFunction simple type (§3.18.18).

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_DataField">

   <sequence>

   <element name="extLst" minOccurs="0" type="CT_ExtensionList"/>

   </sequence>

   <attribute name="name" use="optional" type="ST_Xstring"/>

   <attribute name="fld" type="xsd:unsignedInt" use="required"/>

   <attribute name="subtotal" type="ST_DataConsolidateFunction" default="sum"/>

   <attribute name="showDataAs" type="ST_ShowDataAs" default="normal"/>

   <attribute name="baseField" type="xsd:int" default="-1"/>

   <attribute name="baseItem" type="xsd:unsignedInt" default="1048832"/>

   <attribute name="numFmtId" type="ST_NumFmtId" use="optional"/>

</complexType>