SortState Class
Sort State for Auto Filter.When the object is serialized out as xml, its qualified name is x:sortState.
Inheritance Hierarchy
System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlCompositeElement
DocumentFormat.OpenXml.Spreadsheet.SortState
Namespace: DocumentFormat.OpenXml.Spreadsheet
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
声明
<ChildElementInfoAttribute(GetType(SortCondition), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(ExtensionList))> _
<ChildElementInfoAttribute(GetType(SortCondition))> _
Public Class SortState _
Inherits OpenXmlCompositeElement
用法
Dim instance As SortState
[ChildElementInfoAttribute(typeof(SortCondition), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(ExtensionList))]
[ChildElementInfoAttribute(typeof(SortCondition))]
public class SortState : OpenXmlCompositeElement
Remarks
The following table lists the possible child types:
DocumentFormat.OpenXml.Office2010.Excel.SortCondition <x14:sortCondition>
SortCondition <x:sortCondition>
ExtensionList <x:extLst>
[ISO/IEC 29500-1 第 1 个版本]
18.3.1.92 sortState (Sort State)
This collection preserves the AutoFilter sort state.
[Example:This example shows a sort which is case-sensitive, descending sort. While the range of data to sort is B4:E8, the range to sort by is B4:B8.
<sortState caseSensitive="1" ref="B4:E8">
<sortCondition descending="1" ref="B4:B8"/>
</sortState>
end example]
Parent Elements |
---|
autoFilter (§18.3.1.2); queryTableRefresh (§18.12.6); table (§18.5.1.2); worksheet (§18.3.1.99) |
Child Elements |
Subclause |
---|---|
extLst (Future Feature Data Storage Area) |
§18.2.10 |
sortCondition (Sort Condition) |
§18.3.1.91 |
Attributes |
Description |
---|---|
caseSensitive (Case Sensitive) |
Flag indicating whether or not the sort is case-sensitive. The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
columnSort (Sort by Columns) |
Flag indicating whether or not to sort by columns. Only applies to ranges that don't have AutoFilter applied. The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
ref (Sort Range) |
The whole range of data to sort (not just the sort-by column). The possible values for this attribute are defined by the ST_Ref simple type (§18.18.62). |
sortMethod (Sort Method) |
Strokes or PinYin sort method. Applies only to these application UI languages:
For these languages, alternate sort methods can be selected, affecting how the data is sorted. The possible values for this attribute are defined by the ST_SortMethod simple type (§18.18.73). |
[Note: The W3C XML Schema definition of this element's content model (CT_SortState) is located in §A.2. end note]
© ISO/IEC29500: 2008. 以上摘要已经由 Microsoft(和/或其代理公司)从英语翻译为简体中文,ISO 对此翻译不承担任何责任。
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.