Share via


Item Class

PivotTable Field Item.When the object is serialized out as xml, its qualified name is x:item.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Spreadsheet.Item

Namespace:  DocumentFormat.OpenXml.Spreadsheet
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
Public Class Item _
    Inherits OpenXmlLeafElement
'Usage
Dim instance As Item
public class Item : OpenXmlLeafElement

Remarks

[ISO/IEC 29500-1 1st Edition]

18.10.1.45 item (PivotTable Field Item)

Represents a single item in PivotTable field.

[Example:

<sh:item x="66"/>

end example]

Parent Elements

items (§18.10.1.46)

Attributes

Description

c (Child Items)

Specifies a boolean value that indicates whether the approximate number of child items for this item is greater than zero.

A value of 1 or true indicates the approximate number of child items for this item is greater than zero.

A value of 0 or false indicates the approximate number of child items for this item is zero.

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

d (Expanded)

Specifies a boolean value that indicates whether this item has been expanded in the PivotTable view.

A value of 1 or true indicates this item has been expanded.

A value of 0 or false indicates this item is collapsed.

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

e (Drill Across Attributes)

Specifies a boolean value that indicates whether attribute hierarchies nested next to each other on a PivotTable row or column will offer drilling "across" each other or not. [Example: if the application offers drill across for attribute hierarchies and not for user hierarchies, this attribute would only be written when two attribute hierarchies are placed next to each other on an axis. end example]

A value of 1 or true indicates there is a drill across attribute hierarchies positioned next to each other on a pivot axis.

A value of 0 or false indicates there is not drill across attribute hierarchies.

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

f (Calculated Member)

Specifies a boolean value that indicates whether this item is a calculated member.

A value of 1 or true indicates this item is a calculated member.

A value of 0 or false indicates this item is not calculated.

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

h (Hidden)

Specifies a boolean value that indicates whether the item is hidden.

A value of 1 or true indicates item is hidden.

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

m (Missing)

Specifies a boolean value that indicate whether the item has a missing value.

A value of 1 or true indicates the item value is missing. The application should still retain the item settings in case the item reappears during a later refresh.

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

n (Item User Caption)

Specifies the user caption of the item.

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

s (Character)

Specifies a boolean value that indicates whether the item has a character value.

A value of 1 or true indicates the item has a string/character value.

A value of 0 or false indicates item the item has a value of a different type.

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

sd (Hide Details)

Specifies a boolean value that indicates whether the details are hidden for this item.

A value of 1 or true indicates item details are hidden.

A value of 0 or false indicates item details are shown.

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

t (Item Type)

Specifies the type of this item. A value of 'default' indicates the subtotal or total item.

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

x (Item Index)

Specifies the item index in pivotFields collection in the PivotCache. Applies only non-OLAP PivotTables.

[Example: In the following example, "Product Category" and "Product Subcategory" are on the row axis of the PivotTable, in that order.

<rowFields count="2">
        <field x="7"/>
        <x="8"/>
    </rowFieldsfield > 

end example]

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

[Note: The W3C XML Schema definition of this element’s content model (CT_Item) 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.

See Also

Reference

Item Members

DocumentFormat.OpenXml.Spreadsheet Namespace