Click or drag to resize

PivotTableDefinition Class

PivotTable Definition.

This class is available in Office 2007 and above.

When the object is serialized out as xml, it's qualified name is x:pivotTableDefinition.

Inheritance Hierarchy
SystemObject
  DocumentFormat.OpenXmlOpenXmlElement
    DocumentFormat.OpenXmlOpenXmlCompositeElement
      DocumentFormat.OpenXmlOpenXmlPartRootElement
        TypedOpenXmlPartRootElement
          DocumentFormat.OpenXml.SpreadsheetPivotTableDefinition

Namespace: DocumentFormat.OpenXml.Spreadsheet
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll) Version: 2.20.0+Branch.release-v2.20.0.Sha.a873d3fbff9bffe179fea62486da950adf5be65d.a873d3fbff9bffe179fea62486da950adf5be65d
Syntax
public class PivotTableDefinition : TypedOpenXmlPartRootElement

The PivotTableDefinition type exposes the following members.

Constructors
 NameDescription
Public methodPivotTableDefinition Initializes a new instance of the PivotTableDefinition class.
Public methodPivotTableDefinition(IEnumerableOpenXmlElement) Initializes a new instance of the PivotTableDefinition class with the specified child elements.
Public methodPivotTableDefinition(OpenXmlElement) Initializes a new instance of the PivotTableDefinition class with the specified child elements.
Public methodPivotTableDefinition(String) Initializes a new instance of the PivotTableDefinition class from outer XML.
Top
Properties
 NameDescription
Public propertyApplyAlignmentFormats

Apply Alignment Formats

Represents the following attribute in the schema: applyAlignmentFormats

Public propertyApplyBorderFormats

Apply Border Formats

Represents the following attribute in the schema: applyBorderFormats

Public propertyApplyFontFormats

Apply Font Formats

Represents the following attribute in the schema: applyFontFormats

Public propertyApplyNumberFormats

Apply Number Formats

Represents the following attribute in the schema: applyNumberFormats

Public propertyApplyPatternFormats

Apply Pattern Formats

Represents the following attribute in the schema: applyPatternFormats

Public propertyApplyWidthHeightFormats

Apply Width / Height Formats

Represents the following attribute in the schema: applyWidthHeightFormats

Public propertyAsteriskTotals

asteriskTotals

Represents the following attribute in the schema: asteriskTotals

Public propertyAutoFormatId

Auto Format Id

Represents the following attribute in the schema: autoFormatId

Public propertyCacheId

cacheId

Represents the following attribute in the schema: cacheId

Public propertyChartFormat

chartFormat

Represents the following attribute in the schema: chartFormat

Public propertyChartFormats

ChartFormats.

Represents the following element tag in the schema: x:chartFormats.

Public propertyChildElements Gets all the child nodes of the current element.
(Inherited from OpenXmlElement)
Public propertyColumnFields

ColumnFields.

Represents the following element tag in the schema: x:colFields.

Public propertyColumnGrandTotals

colGrandTotals

Represents the following attribute in the schema: colGrandTotals

Public propertyColumnHeaderCaption

colHeaderCaption

Represents the following attribute in the schema: colHeaderCaption

Public propertyColumnHierarchiesUsage

ColumnHierarchiesUsage.

Represents the following element tag in the schema: x:colHierarchiesUsage.

Public propertyColumnItems

ColumnItems.

Represents the following element tag in the schema: x:colItems.

Public propertyCompact

compact

Represents the following attribute in the schema: compact

Public propertyCompactData

compactData

Represents the following attribute in the schema: compactData

Public propertyConditionalFormats

ConditionalFormats.

Represents the following element tag in the schema: x:conditionalFormats.

Public propertyCreatedVersion

createdVersion

Represents the following attribute in the schema: createdVersion

Public propertyCustomListSort

customListSort

Represents the following attribute in the schema: customListSort

Public propertyDataCaption

dataCaption

Represents the following attribute in the schema: dataCaption

Public propertyDataFields

DataFields.

Represents the following element tag in the schema: x:dataFields.

Public propertyDataOnRows

dataOnRows

Represents the following attribute in the schema: dataOnRows

Public propertyDataPosition

dataPosition

Represents the following attribute in the schema: dataPosition

Public propertyDisableFieldList

disableFieldList

Represents the following attribute in the schema: disableFieldList

Public propertyEditData

editData

Represents the following attribute in the schema: editData

Public propertyEnableDrill

enableDrill

Represents the following attribute in the schema: enableDrill

Public propertyEnableFieldProperties

enableFieldProperties

Represents the following attribute in the schema: enableFieldProperties

Public propertyEnableWizard

enableWizard

Represents the following attribute in the schema: enableWizard

Public propertyErrorCaption

errorCaption

Represents the following attribute in the schema: errorCaption

Public propertyExtendedAttributes Gets all extended attributes (attributes not defined in the schema) of the current element.
(Inherited from OpenXmlElement)
Public propertyFeatures Gets a IFeatureCollection for the current element. This feature collection will be read-only, but will inherit features from its parent part and package if available.
(Inherited from OpenXmlElement)
Public propertyFieldListSortAscending

fieldListSortAscending

Represents the following attribute in the schema: fieldListSortAscending

Public propertyFieldPrintTitles

fieldPrintTitles

Represents the following attribute in the schema: fieldPrintTitles

Public propertyFirstChild Gets the first child of the current OpenXmlElement element.
(Inherited from OpenXmlCompositeElement)
Public propertyFormats

Formats.

Represents the following element tag in the schema: x:formats.

Public propertyGrandTotalCaption

grandTotalCaption

Represents the following attribute in the schema: grandTotalCaption

Public propertyGridDropZones

gridDropZones

Represents the following attribute in the schema: gridDropZones

Public propertyHasAttributes Gets a value indicating whether the current element has any attributes.
(Inherited from OpenXmlElement)
Public propertyHasChildren Gets a value indicating whether the current element has any child elements.
(Inherited from OpenXmlCompositeElement)
Public propertyIndent

indent

Represents the following attribute in the schema: indent

Public propertyInnerText Gets or sets the concatenated values of the node and all of its children.
(Inherited from OpenXmlCompositeElement)
Public propertyInnerXml Gets or sets the markup that represents only the child elements of the current element.
(Inherited from OpenXmlCompositeElement)
Public propertyItemPrintTitles

itemPrintTitles

Represents the following attribute in the schema: itemPrintTitles

Public propertyLastChild Gets the last child of the current OpenXmlElement element. Returns null (Nothing in Visual Basic) if there is no such OpenXmlElement element.
(Inherited from OpenXmlCompositeElement)
Public propertyLocalName Gets the local name of the current element.
(Inherited from OpenXmlElement)
Public propertyLocation

Location.

Represents the following element tag in the schema: x:location.

Public propertyMCAttributes Gets or sets the markup compatibility attributes. Returns null if no markup compatibility attributes are defined for the current element.
(Inherited from OpenXmlElement)
Public propertyMdxSubqueries

mdxSubqueries

Represents the following attribute in the schema: mdxSubqueries

Public propertyMergeItem

mergeItem

Represents the following attribute in the schema: mergeItem

Public propertyMinRefreshableVersion

minRefreshableVersion

Represents the following attribute in the schema: minRefreshableVersion

Public propertyMissingCaption

missingCaption

Represents the following attribute in the schema: missingCaption

Public propertyMultipleFieldFilters

multipleFieldFilters

Represents the following attribute in the schema: multipleFieldFilters

Public propertyName

name

Represents the following attribute in the schema: name

Public propertyNamespaceDeclarations Gets all the namespace declarations defined in the current element. Returns an empty enumerator if there is no namespace declaration.
(Inherited from OpenXmlElement)
Public propertyNamespaceUri Gets the namespace URI of the current element.
(Inherited from OpenXmlElement)
Public propertyOpenXmlElementContext Gets the OpenXmlElementContext of the current element.
(Inherited from OpenXmlElement)
Public propertyOuterXml Gets the markup that represents the current element and all of its child elements.
(Inherited from OpenXmlElement)
Public propertyOutline

outline

Represents the following attribute in the schema: outline

Public propertyOutlineData

outlineData

Represents the following attribute in the schema: outlineData

Public propertyPageFields

PageFields.

Represents the following element tag in the schema: x:pageFields.

Public propertyPageOverThenDown

pageOverThenDown

Represents the following attribute in the schema: pageOverThenDown

Public propertyPageStyle

pageStyle

Represents the following attribute in the schema: pageStyle

Public propertyPageWrap

pageWrap

Represents the following attribute in the schema: pageWrap

Public propertyParent Gets the parent element of the current element.
(Inherited from OpenXmlElement)
Public propertyPivotFields

PivotFields.

Represents the following element tag in the schema: x:pivotFields.

Public propertyPivotFilters

PivotFilters.

Represents the following element tag in the schema: x:filters.

Public propertyPivotHierarchies

PivotHierarchies.

Represents the following element tag in the schema: x:pivotHierarchies.

Public propertyPivotTableDefinitionExtensionList

PivotTableDefinitionExtensionList.

Represents the following element tag in the schema: x:extLst.

Public propertyPivotTablePart Gets the PivotTablePart associated with this element.
Public propertyPivotTableStyle

PivotTableStyle.

Represents the following element tag in the schema: x:pivotTableStyleInfo.

Public propertyPivotTableStyleName

pivotTableStyle

Represents the following attribute in the schema: pivotTableStyle

Public propertyPrefix Gets the namespace prefix of current element.
(Inherited from OpenXmlElement)
Public propertyPreserveFormatting

preserveFormatting

Represents the following attribute in the schema: preserveFormatting

Public propertyPrintDrill

printDrill

Represents the following attribute in the schema: printDrill

Public propertyPublished

published

Represents the following attribute in the schema: published

Public propertyRowFields

RowFields.

Represents the following element tag in the schema: x:rowFields.

Public propertyRowGrandTotals

rowGrandTotals

Represents the following attribute in the schema: rowGrandTotals

Public propertyRowHeaderCaption

rowHeaderCaption

Represents the following attribute in the schema: rowHeaderCaption

Public propertyRowHierarchiesUsage

RowHierarchiesUsage.

Represents the following element tag in the schema: x:rowHierarchiesUsage.

Public propertyRowItems

RowItems.

Represents the following element tag in the schema: x:rowItems.

Public propertyShowCalculatedMembers

showCalcMbrs

Represents the following attribute in the schema: showCalcMbrs

Public propertyShowDataDropDown

showDataDropDown

Represents the following attribute in the schema: showDataDropDown

Public propertyShowDataTips

showDataTips

Represents the following attribute in the schema: showDataTips

Public propertyShowDrill

showDrill

Represents the following attribute in the schema: showDrill

Public propertyShowDropZones

showDropZones

Represents the following attribute in the schema: showDropZones

Public propertyShowEmptyColumn

showEmptyCol

Represents the following attribute in the schema: showEmptyCol

Public propertyShowEmptyRow

showEmptyRow

Represents the following attribute in the schema: showEmptyRow

Public propertyShowError

showError

Represents the following attribute in the schema: showError

Public propertyShowHeaders

showHeaders

Represents the following attribute in the schema: showHeaders

Public propertyShowItems

showItems

Represents the following attribute in the schema: showItems

Public propertyShowMemberPropertyTips

showMemberPropertyTips

Represents the following attribute in the schema: showMemberPropertyTips

Public propertyShowMissing

showMissing

Represents the following attribute in the schema: showMissing

Public propertyShowMultipleLabel

showMultipleLabel

Represents the following attribute in the schema: showMultipleLabel

Public propertyStopImmersiveUi

immersive

Represents the following attribute in the schema: immersive

Public propertySubtotalHiddenItems

subtotalHiddenItems

Represents the following attribute in the schema: subtotalHiddenItems

Public propertyTag

tag

Represents the following attribute in the schema: tag

Public propertyUpdatedVersion

updatedVersion

Represents the following attribute in the schema: updatedVersion

Public propertyUseAutoFormatting

useAutoFormatting

Represents the following attribute in the schema: useAutoFormatting

Public propertyVacatedStyle

vacatedStyle

Represents the following attribute in the schema: vacatedStyle

Public propertyVisualTotals

visualTotals

Represents the following attribute in the schema: visualTotals

Public propertyXmlQualifiedName Gets the qualified name of the current element.
(Inherited from OpenXmlElement)
Public propertyXName Gets the qualified name of the current element.
(Inherited from OpenXmlElement)
Top
Methods
 NameDescription
Public methodAddAnnotation Adds an object to the current OpenXmlElement element's list of annotations.
(Inherited from OpenXmlElement)
Public methodAddChild Adds the specified element to the element if it is a known child. This adds the element in the correct location according to the schema.
(Inherited from OpenXmlCompositeElement)
Public methodAddNamespaceDeclaration Adds a namespace declaration to the current node.
(Inherited from OpenXmlElement)
Public methodAncestors Enumerates all of the current element's ancestors.
(Inherited from OpenXmlElement)
Public methodAnnotation(Type) Get the first annotation object of the specified type from the current OpenXmlElement element.
(Inherited from OpenXmlElement)
Public methodAnnotationT Get the first annotation object of the specified type from the current OpenXmlElement element.
(Inherited from OpenXmlElement)
Public methodAnnotations(Type) Gets a collection of annotations with the specified type for the current OpenXmlElement element.
(Inherited from OpenXmlElement)
Public methodAnnotationsT Gets a collection of annotations with the specified type for the current OpenXmlElement element.
(Inherited from OpenXmlElement)
Public methodAppend(IEnumerableOpenXmlElement) Appends each element from a list of elements to the end of the current element's list of child elements.
(Inherited from OpenXmlElement)
Public methodAppend(OpenXmlElement) Appends each element from an array of elements to the end of the current element's list of child elements.
(Inherited from OpenXmlElement)
Public methodAppendChildT Appends the specified element to the end of the current element's list of child nodes.
(Inherited from OpenXmlCompositeElement)
Public methodClearAllAttributes Clears all of the attributes, including both known attributes and extended attributes.
(Inherited from OpenXmlElement)
Public methodClone Creates a duplicate of the current node.
(Inherited from OpenXmlElement)
Public methodCloneNode When overridden in a derived class, creates a duplicate of the node.
(Overrides OpenXmlElementCloneNode(Boolean))
Public methodDescendantsT Enumerate all of the current element's descendants of type T.
(Inherited from OpenXmlElement)
Public methodElementsT Enumerates only the current element's children that have the specified type.
(Inherited from OpenXmlElement)
Public methodElementsAfter Enumerates all of the sibling elements that follow the current element and have the same parent as the current element.
(Inherited from OpenXmlElement)
Public methodElementsBefore Enumerates all of the sibling elements that precede the current element and have the same parent as the current element.
(Inherited from OpenXmlElement)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetAttribute Gets an Open XML attribute with the specified tag name and namespace URI.
(Inherited from OpenXmlElement)
Public methodGetAttributes Gets a list that contains a copy of all the attributes.
(Inherited from OpenXmlElement)
Public methodGetEnumerator Returns an enumerator that iterates through the child collection.
(Inherited from OpenXmlElement)
Public methodGetFirstChildT Finds the first child element in type T.
(Inherited from OpenXmlElement)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodInsertAfterT Inserts the specified element immediately after the specified reference element.
(Inherited from OpenXmlCompositeElement)
Public methodInsertAfterSelfT Inserts the specified element immediately after the current element.
(Inherited from OpenXmlElement)
Public methodInsertAtT Inserts the specified element at the specified index in the current element's list of child elements.
(Inherited from OpenXmlCompositeElement)
Public methodInsertBeforeT Inserts the specified element immediately before the specified reference element.
(Inherited from OpenXmlCompositeElement)
Public methodInsertBeforeSelfT Inserts the specified element immediately before the current element.
(Inherited from OpenXmlElement)
Public methodIsAfter Determines if the current element appears after a specified element in document order.
(Inherited from OpenXmlElement)
Public methodIsBefore Determines if the current element appears before a specified element in document order.
(Inherited from OpenXmlElement)
Public methodLoad Loads the DOM from the PivotTablePart
Public methodLookupNamespace Resolves the namespace prefix in the context of the current node.
(Inherited from OpenXmlElement)
Public methodLookupPrefix Finds the corresponding prefix for a namespace uri in the current element scope.
(Inherited from OpenXmlElement)
Public methodNextSibling Gets the OpenXmlElement element that immediately follows the current OpenXmlElement element. Returns null (Nothing in Visual Basic) if there is no next OpenXmlElement element.
(Inherited from OpenXmlElement)
Public methodPrependChildT Inserts the specified element at the beginning of the current element's list of child elements.
(Inherited from OpenXmlCompositeElement)
Public methodPreviousSibling Gets the OpenXmlElement element that immediately precedes the current OpenXmlElement element. Returns null (Nothing in Visual Basic ) if there is no preceding OpenXmlElement element.
(Inherited from OpenXmlElement)
Public methodReload Reloads the part content into an Open XML DOM tree. This method can be called multiple times and each time it is called, the tree will be reloaded and previous changes on the tree are abandoned.
(Inherited from OpenXmlPartRootElement)
Public methodRemove Removes the current element from its parent.
(Inherited from OpenXmlElement)
Public methodRemoveAllChildren Removes all of the current element's child elements.
(Inherited from OpenXmlCompositeElement)
Public methodRemoveAnnotations(Type) Removes the annotations of the specified type from the current OpenXmlElement element.
(Inherited from OpenXmlElement)
Public methodRemoveAnnotationsT Removes the annotations with the specified type from the current OpenXmlElement element.
(Inherited from OpenXmlElement)
Public methodRemoveAttribute Removes the attribute from the current element.
(Inherited from OpenXmlElement)
Public methodRemoveChildT Removes the specified child element from the current element's list of child elements.
(Inherited from OpenXmlCompositeElement)
Public methodRemoveNamespaceDeclaration Removes the namespace declaration for the specified prefix. Removes nothing if there is no prefix.
(Inherited from OpenXmlElement)
Public methodReplaceChildT Replaces a child element with another child element in the current element's list of child elements.
(Inherited from OpenXmlCompositeElement)
Public methodSave Saves the data in the DOM tree back to the part. This method can be called multiple times and each time it is called, the stream will be flushed.
(Inherited from OpenXmlPartRootElement)
Public methodSave(PivotTablePart) Saves the DOM into the PivotTablePart.
Public methodSave(Stream) Saves the DOM tree to the specified stream.
(Inherited from OpenXmlPartRootElement)
Public methodSetAttribute Sets an attribute to the specified element. If the attribute is a known attribute, the value of the attribute is set. If the attribute is an extended attribute, the 'openxmlAttribute' is added to the extended attributes list.
(Inherited from OpenXmlElement)
Public methodSetAttributes Sets a number of attributes to the element. If an attribute is a known attribute, the value of the attribute is set. If an attribute is an extended attribute, the 'openxmlAttribute' is added to the extended attributes list.
(Inherited from OpenXmlElement)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodWriteTo Saves the current node to the specified XmlWriter.
(Inherited from OpenXmlPartRootElement)
Top
See Also