共用方式為


ConditionalFormattingRule Class

Definition

Defines the ConditionalFormattingRule Class.

This class is available in Office 2010 and above.

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

[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office.Excel.Formula))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.ColorScale), DocumentFormat.OpenXml.FileFormatVersions.Office2010)]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.DataBar), DocumentFormat.OpenXml.FileFormatVersions.Office2010)]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.IconSet), DocumentFormat.OpenXml.FileFormatVersions.Office2010)]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.DifferentialType), DocumentFormat.OpenXml.FileFormatVersions.Office2010)]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.ExtensionList), DocumentFormat.OpenXml.FileFormatVersions.Office2010)]
[DocumentFormat.OpenXml.OfficeAvailability(DocumentFormat.OpenXml.FileFormatVersions.Office2010)]
[DocumentFormat.OpenXml.SchemaAttr(53, "cfRule")]
public class ConditionalFormattingRule : DocumentFormat.OpenXml.OpenXmlCompositeElement
public class ConditionalFormattingRule : DocumentFormat.OpenXml.OpenXmlCompositeElement
[DocumentFormat.OpenXml.SchemaAttr(53, "cfRule")]
public class ConditionalFormattingRule : DocumentFormat.OpenXml.OpenXmlCompositeElement
[DocumentFormat.OpenXml.SchemaAttr("x14:cfRule")]
public class ConditionalFormattingRule : DocumentFormat.OpenXml.OpenXmlCompositeElement
[DocumentFormat.OpenXml.SchemaAttr("x14:cfRule")]
public class ConditionalFormattingRule : DocumentFormat.OpenXml.TypedOpenXmlCompositeElement
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office.Excel.Formula))]
[DocumentFormat.OpenXml.OfficeAvailability(DocumentFormat.OpenXml.FileFormatVersions.Office2010)]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.ColorScale), DocumentFormat.OpenXml.FileFormatVersions.Office2010 | DocumentFormat.OpenXml.FileFormatVersions.Office2013)]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.DataBar), DocumentFormat.OpenXml.FileFormatVersions.Office2010 | DocumentFormat.OpenXml.FileFormatVersions.Office2013)]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.IconSet), DocumentFormat.OpenXml.FileFormatVersions.Office2010 | DocumentFormat.OpenXml.FileFormatVersions.Office2013)]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.DifferentialType), DocumentFormat.OpenXml.FileFormatVersions.Office2010 | DocumentFormat.OpenXml.FileFormatVersions.Office2013)]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.ExtensionList), DocumentFormat.OpenXml.FileFormatVersions.Office2010 | DocumentFormat.OpenXml.FileFormatVersions.Office2013)]
public class ConditionalFormattingRule : DocumentFormat.OpenXml.OpenXmlCompositeElement
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office.Excel.Formula))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.ColorScale), DocumentFormat.OpenXml.FileFormatVersions.Office2010)]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.DataBar), DocumentFormat.OpenXml.FileFormatVersions.Office2010)]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.IconSet), DocumentFormat.OpenXml.FileFormatVersions.Office2010)]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.DifferentialType), DocumentFormat.OpenXml.FileFormatVersions.Office2010)]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.ExtensionList), DocumentFormat.OpenXml.FileFormatVersions.Office2010)]
[DocumentFormat.OpenXml.OfficeAvailability(DocumentFormat.OpenXml.FileFormatVersions.Office2010)]
public class ConditionalFormattingRule : DocumentFormat.OpenXml.OpenXmlCompositeElement
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office.Excel.Formula))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.ColorScale), DocumentFormat.OpenXml.FileFormatVersions.Office2010)>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.DataBar), DocumentFormat.OpenXml.FileFormatVersions.Office2010)>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.IconSet), DocumentFormat.OpenXml.FileFormatVersions.Office2010)>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.DifferentialType), DocumentFormat.OpenXml.FileFormatVersions.Office2010)>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.ExtensionList), DocumentFormat.OpenXml.FileFormatVersions.Office2010)>]
[<DocumentFormat.OpenXml.OfficeAvailability(DocumentFormat.OpenXml.FileFormatVersions.Office2010)>]
[<DocumentFormat.OpenXml.SchemaAttr(53, "cfRule")>]
type ConditionalFormattingRule = class
    inherit OpenXmlCompositeElement
type ConditionalFormattingRule = class
    inherit OpenXmlCompositeElement
[<DocumentFormat.OpenXml.SchemaAttr(53, "cfRule")>]
type ConditionalFormattingRule = class
    inherit OpenXmlCompositeElement
[<DocumentFormat.OpenXml.SchemaAttr("x14:cfRule")>]
type ConditionalFormattingRule = class
    inherit OpenXmlCompositeElement
[<DocumentFormat.OpenXml.SchemaAttr("x14:cfRule")>]
type ConditionalFormattingRule = class
    inherit TypedOpenXmlCompositeElement
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office.Excel.Formula))>]
[<DocumentFormat.OpenXml.OfficeAvailability(DocumentFormat.OpenXml.FileFormatVersions.Office2010)>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.ColorScale), DocumentFormat.OpenXml.FileFormatVersions.Office2010 | DocumentFormat.OpenXml.FileFormatVersions.Office2013)>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.DataBar), DocumentFormat.OpenXml.FileFormatVersions.Office2010 | DocumentFormat.OpenXml.FileFormatVersions.Office2013)>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.IconSet), DocumentFormat.OpenXml.FileFormatVersions.Office2010 | DocumentFormat.OpenXml.FileFormatVersions.Office2013)>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.DifferentialType), DocumentFormat.OpenXml.FileFormatVersions.Office2010 | DocumentFormat.OpenXml.FileFormatVersions.Office2013)>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.ExtensionList), DocumentFormat.OpenXml.FileFormatVersions.Office2010 | DocumentFormat.OpenXml.FileFormatVersions.Office2013)>]
type ConditionalFormattingRule = class
    inherit OpenXmlCompositeElement
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office.Excel.Formula))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.ColorScale), DocumentFormat.OpenXml.FileFormatVersions.Office2010)>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.DataBar), DocumentFormat.OpenXml.FileFormatVersions.Office2010)>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.IconSet), DocumentFormat.OpenXml.FileFormatVersions.Office2010)>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.DifferentialType), DocumentFormat.OpenXml.FileFormatVersions.Office2010)>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Office2010.Excel.ExtensionList), DocumentFormat.OpenXml.FileFormatVersions.Office2010)>]
[<DocumentFormat.OpenXml.OfficeAvailability(DocumentFormat.OpenXml.FileFormatVersions.Office2010)>]
type ConditionalFormattingRule = class
    inherit OpenXmlCompositeElement
Public Class ConditionalFormattingRule
Inherits OpenXmlCompositeElement
Public Class ConditionalFormattingRule
Inherits TypedOpenXmlCompositeElement
Inheritance
ConditionalFormattingRule
Inheritance
Attributes

Remarks

2.6.27 CT_CfRule

Target namespace: http://schemas.microsoft.com/office/spreadsheetml/2009/9/main

Referenced by: CT_ConditionalFormatting

This complex type specifies a conditional formatting rule for a range.

Child Elements:

xm:f: f elements that specify the formulas in the conditional formatting rule. The formulas MUST adhere to the grammar specified in Formulas, with the following restrictions:

The formula MUST NOT conform to the ref-infix-operator, book-prefix, local-cell-reference, array-constant, bang-reference, bang-name, sheet-range-reference, or structure-reference production rules.

The formula MUST NOT match the single-sheet-area production rule.

The following table explains how to interpret the formulas.

Value of type Interpretation of the formulas in f
cellIs f elements that specify the formulas, numeric values, or cell references that specify the operands for the ST_ConditionalFormattingOperator ([ISO/IEC-29500-1] section 18.18.15) specified by operator. If operator is "between" or "notBetween", f MUST contain two formulas; otherwise, f MUST contain one formula.
expression An f element that specifies a formula. When the formula returns zero, conditional formatting is not displayed. When the formula returns a nonzero value, conditional formatting is displayed.
colorScale, dataBar, iconSet An f element that specifies a formula. When the formula returns zero, conditional formatting is not displayed. When the formula returns a nonzero value, or is not present, conditional formatting is displayed.
containsText, notContainsText, beginsWith,

endsWith,

containsBlanks, notContainsBlanks,

containsErrors,

notContainsErrors
An f element that specifies a formula that implements the operation specified by type. When the formula returns zero, conditional formatting is not displayed. When the formula returns a nonzero value, conditional formatting is displayed.

colorScale: A CT_ColorScale element that specifies a color scale.

dataBar: A CT_DataBar element that specifies a data bar.

iconSet: A CT_IconSet element that specifies an icon set.

dxf: A CT_Dxf ([ISO/IEC-29500-4] section A.2) element that specifies the differential formatting ([ISO/IEC-29500-1] section M.2.7.3.8) applied to the range. If type is "colorScale", "dataBar", or "iconSet", or the priority attribute does not exist, this element MUST NOT exist.

extLst: A CT_ExtensionList ([ISO/IEC-29500-4] section A.2) element that specifies future extensibility for this element.

Attributes:

type: An ST_CfType ([ISO/IEC-29500-1] section 18.18.12) attribute that specifies the way conditional formatting is displayed in the range.

If and only if type is "colorScale", a colorScale child element MUST exist in this element.

If and only if type is "dataBar", a dataBar child element MUST exist in this element.

If and only if type is "iconSet", an iconSet child element MUST exist in this element.

priority: An int ([XMLSCHEMA2] section 3.3.17) attribute that specifies the relative priority of this rule compared to the other rules in this sheet (1), or whether this CT_CfRule specifies extension information for a conditional formatting data bar rule as specified by the associated CT_CfRule ([ISO/IEC-29500-4] section A.2) element. MUST be greater than 0.

If priority exists, rules are applied in order from the smallest priority to the largest priority and it MUST NOT duplicate a priority value in any other CT_CfRule or CT_CfRule ([ISO/IEC-29500-4] section A.2) element that exists in the same worksheet part.

If priority does not exist, this CT_CfRule specifies extension information for a conditional formatting data bar rule, and the dataBar child element MUST exist and describe this additional information. The id attribute is used to identify the associated CT_CfRule ([ISO/IEC-29500-4] section A.2), and the priority attribute of this CT_CfRule ([ISO/IEC-29500-4] section A.2) specifies the relative priority of this rule. If neither the priority attribute nor the id attribute exists in this element, or if id exists but there exists no CT_CfRule ([ISO/IEC-29500-4] section A.2) element containing a matching GUID, this record and the succeeding dataBar child element MUST be ignored. If the priority attribute exists in this element, id MUST be ignored.

stopIfTrue: A Boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies whether evaluation of additional conditional formatting rules is skipped for a cell if this rule evaluates to "true" for that cell.

aboveAverage: A Boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies whether the conditional formatting rule is applied to cells with values above or below the average value of other cells in the range as specified by the following table. This attribute MUST NOT exist if type is not equal to "aboveAverage".

Value Meaning
"true" The conditional formatting rule is applied to cells with values above the average value of all cells in the range.
"false" The conditional formatting rule is applied to cells with values below the average value of all cells in the range.

percent: A Boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies whether the conditional formatting rule is applied to a percentage of cells as specified by the following table. This attribute MUST NOT exist if type is not equal to "top10".

Value Meaning
"true" rank specifies the percentage of cells in the range to which conditional formatting is applied.
"false" The conditional formatting rule is applied to the number of cells specified by rank.

bottom: A Boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies how the conditional formatting rule is applied as specified by the following table. This attribute MUST NOT exist if type is not equal to "top10".

Value Meaning
"true" Conditional formatting is applied to cells whose value is in the bottom end of the range specified by percent and rank.
"false" Conditional formatting is applied to cells whose value is in the top end of the range specified by percent and rank.

operator: An ST_ConditionalFormattingOperator ([ISO/IEC-29500-1] section 18.18.15) attribute that specifies the type of value comparison used for this conditional formatting rule. This attribute MUST NOT exist if type is not equal to "cellIs".

text: A string ([XMLSCHEMA2] section 3.2.1) attribute that specifies a text value used for this conditional formatting rule. This attribute MUST NOT exist if type is not equal to "beginsWith", "containsText", "endsWith", or "notContainsText".

timePeriod: An ST_TimePeriod ([ISO/IEC-29500-1] section 18.18.82) attribute that specifies the time period used for this conditional formatting rule. This attribute MUST NOT exist if type is not equal to "timePeriod".

rank: An unsignedInt ([XMLSCHEMA2] section 3.3.22) attribute that specifies how many cells are formatted by this conditional formatting rule. The value of percent specifies whether rank is a percentage or a quantity of cells. When percent is "true", rank MUST be greater than or equal to zero and less than or equal to 100. Otherwise, rank MUST be greater than or equal to 1 and less than or equal to 1,000. This attribute MUST NOT exist if type is not equal to "top10".

stdDev: An int ([XMLSCHEMA2] section 3.3.17) attribute that specifies the number of standard deviations above or below the average to format in the conditional formatting rule. This attribute MUST NOT exist if type is not equal to "aboveAverage" or if equalAverage is "true".

equalAverage: A Boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies, together with aboveAverage, how the conditional formatting rule is applied as specified by the following table. This attribute MUST NOT exist if type is not equal to "aboveAverage".

Value of equalAverage Value of aboveAverage Meaning
"true" "true" Conditional formatting is applied to cells whose value is equal to or above the average value of cells in the range.
"true" "false" Conditional formatting is applied to cells whose value is equal to or below the average value of cells in the range.
"false" "true" Conditional formatting is applied to cells whose value is above the average value of all cells in the range plus stdDev and multiplied by the standard deviation of all cells in the range.
"false" "false" Conditional formatting is applied to cells whose value is below the average value of all cells in the range minus stdDev and multiplied by the standard deviation of all cells in the range.

activePresent: A Boolean ([XMLSCHEMA2] section 3.2.2) attribute that MUST be "true" if, and only if, a formula is present in f and type is "colorScale", "dataBar", or "iconSet".

id: An ST_Guid ([ISO/IEC-29500-1] section 22.9.2.4) attribute that identifies this conditional formatting rule. If the priority attribute does not exist, and this attribute exists, this attribute is used to match this CT_CfRule element to the corresponding CT_CfRule ([ISO/IEC-29500-4] section A.2) element. If neither the priority attribute nor this attribute exists, this CT_CfRule and its child CT_DataBar element MUST be ignored.

The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this complex type.

<xsd:complexType name="CT_CfRule">

<xsd:sequence>

<xsd:element ref="xm:f" minOccurs="0" maxOccurs="3"/>

<xsd:element name="colorScale" type="CT_ColorScale" minOccurs="0" maxOccurs="1"/>

<xsd:element name="dataBar" type="CT_DataBar" minOccurs="0" maxOccurs="1"/>

<xsd:element name="iconSet" type="CT_IconSet" minOccurs="0" maxOccurs="1"/>

<xsd:element name="dxf" type="x:CT_Dxf" minOccurs="0" maxOccurs="1"/>

<xsd:element name="extLst" type="x:CT_ExtensionList" minOccurs="0" maxOccurs="1"/>

</xsd:sequence>

<xsd:attribute name="type" type="x:ST_CfType" use="optional"/>

<xsd:attribute name="priority" type="xsd:int" use="optional"/>

<xsd:attribute name="stopIfTrue" type="xsd:boolean" use="optional" default="false"/>

<xsd:attribute name="aboveAverage" type="xsd:boolean" use="optional" default="true"/>

<xsd:attribute name="percent" type="xsd:boolean" use="optional" default="false"/>

<xsd:attribute name="bottom" type="xsd:boolean" use="optional" default="false"/>

<xsd:attribute name="operator" type="x:ST_ConditionalFormattingOperator" use="optional"/>

<xsd:attribute name="text" type="xsd:string" use="optional"/>

<xsd:attribute name="timePeriod" type="x:ST_TimePeriod" use="optional"/>

<xsd:attribute name="rank" type="xsd:unsignedInt" use="optional"/>

<xsd:attribute name="stdDev" type="xsd:int" use="optional"/>

<xsd:attribute name="equalAverage" type="xsd:boolean" use="optional" default="false"/>

<xsd:attribute name="activePresent" type="xsd:boolean" use="optional" default="false"/>

<xsd:attribute name="id" type="x:ST_Guid" use="optional"/>

</xsd:complexType>

See section 5.4 for the full W3C XML Schema ([XMLSCHEMA1] section 2.1).

Constructors

ConditionalFormattingRule()

Initializes a new instance of the ConditionalFormattingRule class.

ConditionalFormattingRule(IEnumerable<OpenXmlElement>)

Initializes a new instance of the ConditionalFormattingRule class with the specified child elements.

ConditionalFormattingRule(OpenXmlElement[])

Initializes a new instance of the ConditionalFormattingRule class with the specified child elements.

ConditionalFormattingRule(String)

Initializes a new instance of the ConditionalFormattingRule class from outer XML.

Properties

AboveAverage

aboveAverage, this property is only available in Office 2010 and later.

Represents the following attribute in the schema: aboveAverage

ActivePresent

activePresent, this property is only available in Office 2010 and later.

Represents the following attribute in the schema: activePresent

Bottom

bottom, this property is only available in Office 2010 and later.

Represents the following attribute in the schema: bottom

ChildElements

Gets all the child nodes of the current element.

(Inherited from OpenXmlElement)
EqualAverage

equalAverage, this property is only available in Office 2010 and later.

Represents the following attribute in the schema: equalAverage

ExtendedAttributes

Gets all extended attributes (attributes not defined in the schema) of the current element.

(Inherited from OpenXmlElement)
Features

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

Gets the first child of the current OpenXmlElement element.

(Inherited from OpenXmlCompositeElement)
HasAttributes

Gets a value indicating whether the current element has any attributes.

(Inherited from OpenXmlElement)
HasChildren

Gets a value that indicates whether the current element has any child elements.

(Inherited from OpenXmlCompositeElement)
Id

id, this property is only available in Office 2010 and later.

Represents the following attribute in the schema: id

InnerText

Gets or sets the concatenated values of the current node and all of its children.

(Inherited from OpenXmlCompositeElement)
InnerXml

Gets or sets the markup that represents only the child nodes of the current node.

(Inherited from OpenXmlCompositeElement)
LastChild

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

Gets the local name of the current element.

(Inherited from OpenXmlElement)
MCAttributes

Gets or sets the markup compatibility attributes. Returns null if no markup compatibility attributes are defined for the current element.

(Inherited from OpenXmlElement)
NamespaceDeclarations

Gets all the namespace declarations defined in the current element. Returns an empty enumerator if there is no namespace declaration.

(Inherited from OpenXmlElement)
NamespaceUri

Gets the namespace URI of the current element.

(Inherited from OpenXmlElement)
OpenXmlElementContext

Gets the OpenXmlElementContext of the current element.

(Inherited from OpenXmlElement)
Operator

operator, this property is only available in Office 2010 and later.

Represents the following attribute in the schema: operator

OuterXml

Gets the markup that represents the current element and all of its child elements.

(Inherited from OpenXmlElement)
Parent

Gets the parent element of the current element.

(Inherited from OpenXmlElement)
Percent

percent, this property is only available in Office 2010 and later.

Represents the following attribute in the schema: percent

Prefix

Gets the namespace prefix of current element.

(Inherited from OpenXmlElement)
Priority

priority, this property is only available in Office 2010 and later.

Represents the following attribute in the schema: priority

Rank

rank, this property is only available in Office 2010 and later.

Represents the following attribute in the schema: rank

StandardDeviation

stdDev, this property is only available in Office 2010 and later.

Represents the following attribute in the schema: stdDev

StopIfTrue

stopIfTrue, this property is only available in Office 2010 and later.

Represents the following attribute in the schema: stopIfTrue

Text

text, this property is only available in Office 2010 and later.

Represents the following attribute in the schema: text

TimePeriod

timePeriod, this property is only available in Office 2010 and later.

Represents the following attribute in the schema: timePeriod

Type

type, this property is only available in Office 2010 and later.

Represents the following attribute in the schema: type

XmlQualifiedName

Gets the qualified name of the current element.

(Inherited from OpenXmlElement)
XName

Gets the qualified name of the current element.

(Inherited from OpenXmlElement)

Methods

AddAnnotation(Object)

Adds an object to the current OpenXmlElement element's list of annotations.

(Inherited from OpenXmlElement)
AddChild(OpenXmlElement, Boolean)

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)
AddNamespaceDeclaration(String, String)

Adds a namespace declaration to the current node.

(Inherited from OpenXmlElement)
Ancestors()

Enumerates all of the current element's ancestors.

(Inherited from OpenXmlElement)
Ancestors<T>()

Enumerates only the current element's ancestors that have the specified type.

(Inherited from OpenXmlElement)
Annotation(Type)

Get the first annotation object of the specified type from the current OpenXmlElement element.

(Inherited from OpenXmlElement)
Annotation<T>()

Get the first annotation object of the specified type from the current OpenXmlElement element.

(Inherited from OpenXmlElement)
Annotations(Type)

Gets a collection of annotations with the specified type for the current OpenXmlElement element.

(Inherited from OpenXmlElement)
Annotations<T>()

Gets a collection of annotations with the specified type for the current OpenXmlElement element.

(Inherited from OpenXmlElement)
Append(IEnumerable<OpenXmlElement>)

Appends each element from a list of elements to the end of the current element's list of child elements.

(Inherited from OpenXmlElement)
Append(OpenXmlElement[])

Appends each element from an array of elements to the end of the current element's list of child elements.

(Inherited from OpenXmlElement)
AppendChild<T>(T)

Appends the specified element to the end of the current element's list of child nodes.

(Inherited from OpenXmlCompositeElement)
ClearAllAttributes()

Clears all of the attributes, including both known attributes and extended attributes.

(Inherited from OpenXmlElement)
Clone()

Creates a duplicate of the current node.

(Inherited from OpenXmlElement)
CloneNode(Boolean)

Creates a duplicate of this node.

Descendants()

Enumerates all of the current element's descendants.

(Inherited from OpenXmlElement)
Descendants<T>()

Enumerate all of the current element's descendants of type T.

(Inherited from OpenXmlElement)
Elements()

Enumerates all of the current element's children.

(Inherited from OpenXmlElement)
Elements<T>()

Enumerates only the current element's children that have the specified type.

(Inherited from OpenXmlElement)
ElementsAfter()

Enumerates all of the sibling elements that follow the current element and have the same parent as the current element.

(Inherited from OpenXmlElement)
ElementsBefore()

Enumerates all of the sibling elements that precede the current element and have the same parent as the current element.

(Inherited from OpenXmlElement)
GetAttribute(String, String)

Gets an Open XML attribute with the specified tag name and namespace URI.

(Inherited from OpenXmlElement)
GetAttributes()

Gets a list that contains a copy of all the attributes.

(Inherited from OpenXmlElement)
GetEnumerator()

Returns an enumerator that iterates through the child collection.

(Inherited from OpenXmlElement)
GetFirstChild<T>()

Finds the first child element in type T.

(Inherited from OpenXmlElement)
InsertAfter<T>(T, OpenXmlElement)

Inserts the specified element immediately after the specified reference element.

(Inherited from OpenXmlCompositeElement)
InsertAfterSelf<T>(T)

Inserts the specified element immediately after the current element.

(Inherited from OpenXmlElement)
InsertAt<T>(T, Int32)

Inserts the specified element at the specified index of the current element's children.

(Inherited from OpenXmlCompositeElement)
InsertBefore<T>(T, OpenXmlElement)

Inserts the specified element immediately before the specified reference element.

(Inherited from OpenXmlCompositeElement)
InsertBeforeSelf<T>(T)

Inserts the specified element immediately before the current element.

(Inherited from OpenXmlElement)
IsAfter(OpenXmlElement)

Determines if the current element appears after a specified element in document order.

(Inherited from OpenXmlElement)
IsBefore(OpenXmlElement)

Determines if the current element appears before a specified element in document order.

(Inherited from OpenXmlElement)
LookupNamespace(String)

Resolves the namespace prefix in the context of the current node.

(Inherited from OpenXmlElement)
LookupPrefix(String)

Finds the corresponding prefix for a namespace uri in the current element scope.

(Inherited from OpenXmlElement)
NextSibling()

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)
NextSibling<T>()

Gets the OpenXmlElement element with the specified type that follows the current OpenXmlElement element. Returns null (Nothing in Visual Basic) if there is no next OpenXmlElement.

(Inherited from OpenXmlElement)
PrependChild<T>(T)

Inserts the specified element at the beginning of the current element's list of child nodes.

(Inherited from OpenXmlCompositeElement)
PreviousSibling()

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)
PreviousSibling<T>()

Gets the OpenXmlElement element with the specified type that precedes the current OpenXmlElement. Returns null (Nothing in Visual Basic) if there is no preceding OpenXmlElement element.

(Inherited from OpenXmlElement)
Remove()

Removes the current element from its parent.

(Inherited from OpenXmlElement)
RemoveAllChildren()

Removes all of the current element's child elements.

(Inherited from OpenXmlCompositeElement)
RemoveAllChildren<T>()

Remove all of the current element's child elements that are of type T.

(Inherited from OpenXmlElement)
RemoveAnnotations(Type)

Removes the annotations of the specified type from the current OpenXmlElement element.

(Inherited from OpenXmlElement)
RemoveAnnotations<T>()

Removes the annotations with the specified type from the current OpenXmlElement element.

(Inherited from OpenXmlElement)
RemoveAttribute(String, String)

Removes the attribute from the current element.

(Inherited from OpenXmlElement)
RemoveChild<T>(T)

Removes the specified child element.

(Inherited from OpenXmlCompositeElement)
RemoveNamespaceDeclaration(String)

Removes the namespace declaration for the specified prefix. Removes nothing if there is no prefix.

(Inherited from OpenXmlElement)
ReplaceChild<T>(OpenXmlElement, T)

Replaces one of the current element's child elements with another OpenXmlElement element.

(Inherited from OpenXmlCompositeElement)
SetAttribute(OpenXmlAttribute)

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)
SetAttributes(IEnumerable<OpenXmlAttribute>)

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)
WriteTo(XmlWriter)

Saves the current node to the specified XmlWriter.

(Inherited from OpenXmlElement)

Explicit Interface Implementations

IEnumerable.GetEnumerator() (Inherited from OpenXmlElement)
IEnumerable<OpenXmlElement>.GetEnumerator()

Returns an enumerator that iterates through the child collection.

(Inherited from OpenXmlElement)

Applies to