Partager via


Items Class

Field Items.When the object is serialized out as xml, its qualified name is x:items.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Spreadsheet.Items

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

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(Item))> _
Public Class Items _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As Items
[ChildElementInfoAttribute(typeof(Item))]
public class Items : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • Item <x:item>

[ISO/IEC 29500-1 1st Edition]

18.10.1.46 items (Field Items)

Represents the collection of items in a PivotTable field. The items in the collection are ordered by index. Items represent the unique entries from the field in the source data.

In the following image, the item Golf represents all rows of data in the source list for which the Sport field contains the entry Golf.

DocumentFormat.OpenXml.Spreadsheet.Items-image001

The order in which the items are listed is the order they would appear on a particular axis [Example: Row or column. end example]

[Example: In the following SpreadsheetML example, the first field is "Customer Name" and the first item referenced here is <item x="66"/> which references the value "Adam L Flores" in the pivotCacheDefinition*. Therefore f you added "Customer Name" to the row axis, "Adam L Flores" would be the first row item listed.*

<pivotFields count="28">
<pivotField showAll="0" includeNewItemsInFilter="1">
<items count="8">
<item x="66"/>
<item x="133"/>
<item x="74"/>
      <item x="27"/>
<item x="118"/>
<item x="63"/>
<item x="141"/>
<item t="default"/>
</items>
</pivotField>
  <pivotField showAll="0" includeNewItemsInFilter="1"/>
  <pivotField axis="axisPage" showAll="0" includeNewItemsInFilter="1">
<items count="2">
<item x="0"/>
<item t="default"/>
</items>
</pivotField>
<pivotField showAll="0" includeNewItemsInFilter="1"/>

end example]

Parent Elements

pivotField (§18.10.1.69)

Child Elements

Subclause

item (PivotTable Field Item)

§18.10.1.45

Attributes

Description

count (Field Count)

Specifies the number of fields in the PivotTable.

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_Items) 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

Items Members

DocumentFormat.OpenXml.Spreadsheet Namespace