ConditionalFormattingRule 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
定义 ConditionalFormattingRule 类。
此类在 Office 2010 及更高版本中可用。
当对象序列化为 xml 时,其限定名称为 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
- 继承
- 继承
-
ConditionalFormattingRule
- 属性
注解
2.6.27 CT_CfRule
目标命名空间:http://schemas.microsoft.com/office/spreadsheetml/2009/9/main
引用者: CT_ConditionalFormatting
此复杂类型为区域指定条件格式规则。
子元素:
xm:f: 在条件格式规则中指定公式的 f 元素。 公式必须遵循公式中指定的语法,但有以下限制:
•公式不得符合 ref-infix-operator、book-prefix、local-cell-reference、array-constant、bang-reference、bang-name、sheet-range-reference 或 structure-reference 生产规则。
•公式不能与单工作表区域生产规则匹配。
下表说明了如何解释公式。
| 类型的值 | f 中公式的解释 |
| cellIs | 指定公式、数值或单元格引用的 f 元素,这些引用指定ST_ConditionalFormattingOperator ([ISO/IEC-29500-1] 第 18.18.15 节的操作数) 运算符指定。 如果运算符为“between”或“notBetween”,则 f 必须包含两个公式:否则,f 必须包含一个公式。 |
| expression | 指定公式的 f 元素。 当公式返回零时,不会显示条件格式。 当公式返回非零值时,将显示条件格式。 |
| colorScale、dataBar、iconSet | 指定公式的 f 元素。 当公式返回零时,不会显示条件格式。 当公式返回非零值或不存在时,将显示条件格式。 |
|
containsText,notContainsText,beginsWith, endsWith, containsBlanks,notContainsBlanks, containsErrors, notContainsErrors |
一个 f 元素,指定实现类型指定的操作的公式。 当公式返回零时,不会显示条件格式。 当公式返回非零值时,将显示条件格式。 |
colorScale: 指定色阶的 CT_ColorScale 元素。
dataBar: 指定数据条的 CT_DataBar 元素。
iconSet: 指定 图标集的 CT_IconSet 元素。
dxf:CT_Dxf ([ISO/IEC-29500-4] 节 A.2) 元素,该元素指定 ([ISO/IEC-29500-1] 节 M.2.7.3.8) 应用于该区域的差异格式。 如果 type 为“colorScale”、“dataBar”或“iconSet”,或者 priority 属性不存在,则此元素必须不存在。
extLst:CT_ExtensionList ([ISO/IEC-29500-4] 节 A.2) 元素,指定此元素的未来扩展性。
属性:
类型:ST_CfType ([ISO/IEC-29500-1] 第 18.18.12 节) 属性,该属性指定条件格式在区域中的显示方式。
如果 且仅 当 type 为“colorScale”时,此元素中必须存在 colorScale 子元素。
如果 且仅当 类型 为“dataBar”时,此元素中必须存在 dataBar 子元素。
如果 且仅当 类型 为“iconSet”时,此元素中必须存在 iconSet 子元素。
优先权:int ([XMLSCHEMA2] 第 3.3.17 节) 属性,该属性指定此规则相对于本表中其他规则的相对优先级 (1) , 或此CT_CfRule是否指定由关联CT_CfRule ([ISO/IEC-29500-4] 节 A.2) 元素指定的条件格式设置数据条规则的扩展信息。 必须大于 0。
如果存在优先级,则规则按从最小优先级到最大优先级的顺序应用,并且它不得复制任何其他CT_CfRule或CT_CfRule ([ISO/IEC-29500-4] 节 A.2) 元素中的优先级值。
如果 优先级 不存在,则此CT_CfRule指定条件格式数据条规则的扩展信息,并且 dataBar 子元素必须存在并描述此附加信息。 id 属性用于标识关联的CT_CfRule ([ISO/IEC-29500-4] 部分 A.2) ,此CT_CfRule的优先级属性 ([ISO/IEC-29500-4] 节 A.2) 指定此规则的相对优先级。 如果此元素中不存在 priority 属性和 id 属性,或者 id 存在但不存在 CT_CfRule ([ISO/IEC-29500-4] 部分 A.2) 元素包含匹配 GUID,则必须忽略此记录和后续 dataBar 子元素。 如果此元素中存在 priority 属性,则必须忽略 id 。
stopIfTrue:布尔 ([XMLSCHEMA2] 第 3.2.2 节) 属性,该属性指定如果单元格的计算结果为“true”,则是否为单元格跳过其他条件格式规则的计算。
aboveAverage:布尔 ([XMLSCHEMA2] 第 3.2.2 节) 属性,该属性指定条件格式规则是应用于值高于还是低于下表指定的区域中其他单元格的平均值的单元格。 如果 类型 不等于“aboveAverage”,则此属性必须不存在。
| 值 | 含义 |
| “true” | 条件格式规则应用于值高于该区域中所有单元格的平均值的单元格。 |
| “false” | 条件格式规则应用于值低于该区域中所有单元格的平均值的单元格。 |
百分之:布尔 ([XMLSCHEMA2] 第 3.2.2 节) 属性,该属性指定条件格式规则是否应用于下表指定的单元格百分比。 如果 类型 不等于“top10”,则此属性必须不存在。
| 值 | 含义 |
| “true” | rank 指定应用条件格式的范围中单元格的百分比。 |
| “false” | 条件格式规则应用于由排名指定的单元格数。 |
底:布尔 ([XMLSCHEMA2] 第 3.2.2 节) 属性,该属性指定如何应用下表指定的条件格式规则。 如果 类型 不等于“top10”,则此属性必须不存在。
| 值 | 含义 |
| “true” | 条件格式应用于其值位于百分比和排名指定的范围的下端的单元格。 |
| “false” | 条件格式应用于其值位于百分比和排名指定的区域的顶端的单元格。 |
算子:ST_ConditionalFormattingOperator ([ISO/IEC-29500-1] 第 18.18.15 节) 属性,该属性指定用于此条件格式规则的值比较类型。 如果 类型 不等于“cellIs”,则此属性不得存在。
发短信:字符串 ([XMLSCHEMA2] 第 3.2.1 节) 属性,该属性指定用于此条件格式规则的文本值。 如果 type 不等于“beginsWith”、“containsText”、“endsWith”或“notContainsText”,则此属性必须不存在。
timePeriod:ST_TimePeriod ([ISO/IEC-29500-1] 第 18.18.82 节) 属性,该属性指定用于此条件格式规则的时间段。 如果 type 不等于“timePeriod”,则此属性必须不存在。
排:unsignedInt ([XMLSCHEMA2] 节 3.3.22) 属性,该属性指定此条件格式规则设置了多少个单元格的格式。 百分比的值指定排名是单元格的百分比还是数量。 当 百分比 为“true”时, 排名 必须大于或等于 0 且小于或等于 100。 否则, 排名 必须大于或等于 1 且小于或等于 1,000。 如果 类型 不等于“top10”,则此属性必须不存在。
stdDev:int ([XMLSCHEMA2] 第 3.3.17 节) 属性,该属性指定要在条件格式规则中设置格式的高于或低于平均值的标准偏差数。 如果 type 不等于“aboveAverage”或 equalAverage 为“true”,则此属性必须不存在。
equalAverage:布尔 ([XMLSCHEMA2] 第 3.2.2 节) 属性,该属性与上面Average 一起指定了如何应用下表指定的条件格式规则。 如果 类型 不等于“aboveAverage”,则此属性必须不存在。
| equalAverage 的值 | 上面的值Average | 含义 |
| “true” | “true” | 条件格式应用于其值等于或高于区域中单元格的平均值的单元格。 |
| “true” | “false” | 条件格式应用于其值等于或低于区域中单元格的平均值的单元格。 |
| “false” | “true” | 条件格式应用于其值高于该区域中所有单元格的平均值加上 stdDev 并乘以该区域中所有单元格的标准偏差的单元格。 |
| “false” | “false” | 条件格式应用于值低于范围中所有单元格的平均值减去 stdDev 并乘以该区域中所有单元格的标准偏差的单元格。 |
activePresent:Boolean ([XMLSCHEMA2] 第 3.2.2 节) 属性,仅当 f 中存在公式且类型为“colorScale”、“dataBar”或“iconSet”时,该属性必须为“true”。
id:ST_Guid ([ISO/IEC-29500-1] 第 22.9.2.4 节) 属性,用于标识此条件格式规则。 如果 优先级 属性不存在,并且此属性存在,则此属性用于将此CT_CfRule元素与相应 CT_CfRule ([ISO/IEC-29500-4] 节 A.2) 元素匹配。 如果 优先级 属性和此属性都不存在,则必须忽略此CT_CfRule及其子CT_DataBar元素。
以下 W3C XML 架构 ([XMLSCHEMA1] 部分 2.1) 片段指定此复杂类型的内容。
<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>
有关完整的 W3C XML 架构 ([XMLSCHEMA1] 部分 2.1) ,请参阅第 5.4 节。
构造函数
| ConditionalFormattingRule() |
初始化 ConditionalFormattingRule 类的新实例。 |
| ConditionalFormattingRule(IEnumerable<OpenXmlElement>) |
使用指定的子元素初始化 ConditionalFormattingRule 类的新实例。 |
| ConditionalFormattingRule(OpenXmlElement[]) |
使用指定的子元素初始化 ConditionalFormattingRule 类的新实例。 |
| ConditionalFormattingRule(String) |
从外部 XML 初始化 ConditionalFormattingRule 类的新实例。 |
属性
| AboveAverage |
aboveAverage,此属性仅在 Office 2010 及更高版本中可用。 表示架构中的以下属性:aboveAverage |
| ActivePresent |
activePresent,此属性仅在 Office 2010 及更高版本中可用。 表示架构中的以下属性:activePresent |
| Bottom |
底部,此属性仅在 Office 2010 及更高版本中可用。 表示架构中的以下属性:底部 |
| ChildElements |
获取当前元素的所有子节点。 (继承自 OpenXmlElement) |
| EqualAverage |
equalAverage,此属性仅在 Office 2010 及更高版本中可用。 表示架构中的以下属性:equalAverage |
| ExtendedAttributes |
获取当前元素的架构) 中未定义的所有扩展属性 (属性。 (继承自 OpenXmlElement) |
| Features |
IFeatureCollection获取当前元素的 。 此功能集合将是只读的,但会从其父部件和包继承功能(如果可用)。 (继承自 OpenXmlElement) |
| FirstChild |
获取当前 OpenXmlElement 元素的第一个子元素。 (继承自 OpenXmlCompositeElement) |
| HasAttributes |
获取一个值,该值指示当前元素是否具有任何属性。 (继承自 OpenXmlElement) |
| HasChildren |
获取一个值,该值指示当前元素是否具有任何子元素。 (继承自 OpenXmlCompositeElement) |
| Id |
id,此属性仅在 Office 2010 及更高版本中可用。 表示架构中的以下属性:id |
| InnerText |
获取或设置当前节点及其所有子节点的串联值。 (继承自 OpenXmlCompositeElement) |
| InnerXml |
获取或设置仅表示当前节点的子节点的标记。 (继承自 OpenXmlCompositeElement) |
| LastChild |
获取当前 OpenXmlElement 元素的最后一个子元素。 如果没有这样的 OpenXmlElement 元素,则返回 null (Visual Basic) Nothing。 (继承自 OpenXmlCompositeElement) |
| LocalName |
定义 ConditionalFormattingRule 类。 此类在 Office 2010 及更高版本中可用。 当对象序列化为 xml 时,其限定名称为 x14:cfRule。 |
| LocalName |
获取当前元素的本地名称。 (继承自 OpenXmlElement) |
| MCAttributes |
获取或设置标记兼容性属性。 如果未为当前元素定义标记兼容性属性,则返回 null。 (继承自 OpenXmlElement) |
| NamespaceDeclarations |
获取在当前元素中定义的所有命名空间声明。 如果没有命名空间声明,则返回空枚举器。 (继承自 OpenXmlElement) |
| NamespaceUri |
获取当前元素的命名空间 URI。 (继承自 OpenXmlElement) |
| OpenXmlElementContext |
获取当前元素的 OpenXmlElementContext。 (继承自 OpenXmlElement) |
| Operator |
运算符,此属性仅在 Office 2010 及更高版本中可用。 表示架构中的以下属性: 运算符 |
| OuterXml |
获取表示当前元素及其所有子元素的标记。 (继承自 OpenXmlElement) |
| Parent |
获取当前元素的父元素。 (继承自 OpenXmlElement) |
| Percent |
%,此属性仅在 Office 2010 及更高版本中可用。 表示架构中的以下属性:百分比 |
| Prefix |
获取当前元素的命名空间前缀。 (继承自 OpenXmlElement) |
| Priority |
优先级,此属性仅在 Office 2010 及更高版本中可用。 表示架构中的以下属性:priority |
| Rank |
rank,此属性仅在 Office 2010 及更高版本中可用。 表示架构中的以下属性:rank |
| StandardDeviation |
stdDev,此属性仅在 Office 2010 及更高版本中可用。 表示架构中的以下属性:stdDev |
| StopIfTrue |
stopIfTrue,此属性仅在 Office 2010 及更高版本中可用。 表示架构中的以下属性:stopIfTrue |
| Text |
文本,此属性仅在 Office 2010 及更高版本中可用。 表示架构中的以下属性:text |
| TimePeriod |
timePeriod,此属性仅在 Office 2010 及更高版本中可用。 表示架构中的以下属性:timePeriod |
| Type |
类型,此属性仅在 Office 2010 及更高版本中可用。 表示架构中的以下属性:类型 |
| XmlQualifiedName |
获取当前元素的限定名称。 (继承自 OpenXmlElement) |
| XName |
获取当前元素的限定名称。 (继承自 OpenXmlElement) |
方法
| AddAnnotation(Object) |
将 对象添加到当前 OpenXmlElement 元素的批注列表中。 (继承自 OpenXmlElement) |
| AddChild(OpenXmlElement, Boolean) |
如果指定元素是已知的子元素,则将其添加到 元素。 这会根据架构将 元素添加到正确的位置。 (继承自 OpenXmlCompositeElement) |
| AddNamespaceDeclaration(String, String) |
将命名空间声明添加到当前节点。 (继承自 OpenXmlElement) |
| Ancestors() |
枚举当前元素的所有上级。 (继承自 OpenXmlElement) |
| Ancestors<T>() |
仅枚举具有指定类型的当前元素的上级。 (继承自 OpenXmlElement) |
| Annotation(Type) |
从当前 OpenXmlElement 元素获取指定类型的第一个批注对象。 (继承自 OpenXmlElement) |
| Annotation<T>() |
从当前 OpenXmlElement 元素获取指定类型的第一个批注对象。 (继承自 OpenXmlElement) |
| Annotations(Type) |
获取具有当前 OpenXmlElement 元素的指定类型的批注的集合。 (继承自 OpenXmlElement) |
| Annotations<T>() |
获取具有当前 OpenXmlElement 元素的指定类型的批注的集合。 (继承自 OpenXmlElement) |
| Append(IEnumerable<OpenXmlElement>) |
将元素列表中的每个元素追加到当前元素的子元素列表的末尾。 (继承自 OpenXmlElement) |
| Append(OpenXmlElement[]) |
将元素数组中的每个元素追加到当前元素的子元素列表的末尾。 (继承自 OpenXmlElement) |
| AppendChild<T>(T) |
将指定的元素追加到当前元素的子节点列表的末尾。 (继承自 OpenXmlCompositeElement) |
| ClearAllAttributes() |
清除所有属性,包括已知属性和扩展属性。 (继承自 OpenXmlElement) |
| Clone() |
创建当前节点的副本。 (继承自 OpenXmlElement) |
| CloneNode(Boolean) |
创建此节点的副本。 |
| Descendants() |
枚举当前元素的所有后代。 (继承自 OpenXmlElement) |
| Descendants<T>() |
枚举类型为 T 的当前元素的所有后代。 (继承自 OpenXmlElement) |
| Elements() |
枚举当前元素的所有子元素。 (继承自 OpenXmlElement) |
| Elements<T>() |
仅枚举具有指定类型的当前元素的子元素。 (继承自 OpenXmlElement) |
| ElementsAfter() |
枚举与当前元素相同的父级的所有同级元素。 (继承自 OpenXmlElement) |
| ElementsBefore() |
枚举当前元素之前且具有与当前元素相同的父级的所有同级元素。 (继承自 OpenXmlElement) |
| GetAttribute(String, String) |
获取具有指定标记名称和命名空间 URI 的 Open XML 属性。 (继承自 OpenXmlElement) |
| GetAttributes() |
获取一个列表,该列表包含所有属性的副本。 (继承自 OpenXmlElement) |
| GetEnumerator() |
返回循环访问子集合的枚举器。 (继承自 OpenXmlElement) |
| GetFirstChild<T>() |
查找类型 T 中的第一个子元素。 (继承自 OpenXmlElement) |
| InsertAfter<T>(T, OpenXmlElement) |
在指定的引用元素之后立即插入指定的元素。 (继承自 OpenXmlCompositeElement) |
| InsertAfterSelf<T>(T) |
在当前元素之后立即插入指定的元素。 (继承自 OpenXmlElement) |
| InsertAt<T>(T, Int32) |
在当前元素的子元素的指定索引处插入指定的元素。 (继承自 OpenXmlCompositeElement) |
| InsertBefore<T>(T, OpenXmlElement) |
将指定的元素紧接在指定的引用元素之前。 (继承自 OpenXmlCompositeElement) |
| InsertBeforeSelf<T>(T) |
将指定的元素紧接在当前元素的前面。 (继承自 OpenXmlElement) |
| IsAfter(OpenXmlElement) |
确定当前元素是否以文档顺序显示在指定元素之后。 (继承自 OpenXmlElement) |
| IsBefore(OpenXmlElement) |
确定当前元素是否按文档顺序显示在指定元素之前。 (继承自 OpenXmlElement) |
| LookupNamespace(String) |
解析当前节点上下文中的命名空间前缀。 (继承自 OpenXmlElement) |
| LookupPrefix(String) |
查找当前元素范围内命名空间 URI 的相应前缀。 (继承自 OpenXmlElement) |
| NextSibling() |
获取紧跟在当前 OpenXmlElement 元素后面的 OpenXmlElement 元素。 如果没有下一个 OpenXmlElement 元素,则返回 null (Visual Basic) Nothing。 (继承自 OpenXmlElement) |
| NextSibling<T>() |
获取具有当前 OpenXmlElement 元素后面的指定类型的 OpenXmlElement 元素。 如果没有下一个 OpenXmlElement,则返回 null (Visual Basic) Nothing。 (继承自 OpenXmlElement) |
| PrependChild<T>(T) |
在当前元素的子节点列表的开头插入指定的元素。 (继承自 OpenXmlCompositeElement) |
| PreviousSibling() |
获取紧接在当前 OpenXmlElement 元素之前的 OpenXmlElement 元素。 如果没有前面的 OpenXmlElement 元素,则返回 null (Visual Basic ) 中 Nothing。 (继承自 OpenXmlElement) |
| PreviousSibling<T>() |
获取位于当前 OpenXmlElement 之前的指定类型的 OpenXmlElement 元素。 如果没有前面的 OpenXmlElement 元素,则返回 null (Visual Basic) Nothing。 (继承自 OpenXmlElement) |
| Remove() |
从其父元素中删除当前元素。 (继承自 OpenXmlElement) |
| RemoveAllChildren() |
删除当前元素的所有子元素。 (继承自 OpenXmlCompositeElement) |
| RemoveAllChildren<T>() |
删除类型为 T 的当前元素的所有子元素。 (继承自 OpenXmlElement) |
| RemoveAnnotations(Type) |
从当前 OpenXmlElement 元素中删除指定类型的注释。 (继承自 OpenXmlElement) |
| RemoveAnnotations<T>() |
从当前 OpenXmlElement 元素中删除具有指定类型的批注。 (继承自 OpenXmlElement) |
| RemoveAttribute(String, String) |
从当前元素中删除 属性。 (继承自 OpenXmlElement) |
| RemoveChild<T>(T) |
删除指定的子元素。 (继承自 OpenXmlCompositeElement) |
| RemoveNamespaceDeclaration(String) |
删除指定前缀的命名空间声明。 如果没有前缀,则不删除任何内容。 (继承自 OpenXmlElement) |
| ReplaceChild<T>(OpenXmlElement, T) |
将当前元素的子元素之一替换为另一个 OpenXmlElement 元素。 (继承自 OpenXmlCompositeElement) |
| SetAttribute(OpenXmlAttribute) |
将特性设置为指定的元素。 如果该属性是已知属性,则设置该特性的值。 如果该属性是扩展属性,则会将“openxmlAttribute”添加到扩展属性列表中。 (继承自 OpenXmlElement) |
| SetAttributes(IEnumerable<OpenXmlAttribute>) |
设置元素的多个属性。 如果属性是已知属性,则会设置该属性的值。 如果属性是扩展属性,则会将“openxmlAttribute”添加到扩展属性列表中。 (继承自 OpenXmlElement) |
| WriteTo(XmlWriter) |
将当前节点保存到指定的 XmlWriter。 (继承自 OpenXmlElement) |
显式接口实现
| IEnumerable.GetEnumerator() |
定义 ConditionalFormattingRule 类。 此类在 Office 2010 及更高版本中可用。 当对象序列化为 xml 时,其限定名称为 x14:cfRule。 (继承自 OpenXmlElement) |
| IEnumerable<OpenXmlElement>.GetEnumerator() |
返回循环访问子集合的枚举器。 (继承自 OpenXmlElement) |