[]
Sorts a range of values.
void Sort(string key1 = null, SortOrder order1 = SortOrder.Ascending, string key2 = null, SortType type = SortType.SortLabels, SortOrder order2 = SortOrder.Ascending, string key3 = null, SortOrder order3 = SortOrder.Ascending, YesNoGuess header = YesNoGuess.No, bool matchCase = false, SortMethod sortMethod = SortMethod.PinYin, SortDataOption dataOption1 = SortDataOption.Normal, SortDataOption dataOption2 = SortDataOption.Normal, SortDataOption dataOption3 = SortDataOption.Normal)
Sub Sort(Optional key1 As String = Nothing, Optional order1 As SortOrder = SortOrder.Ascending, Optional key2 As String = Nothing, Optional type As SortType = SortType.SortLabels, Optional order2 As SortOrder = SortOrder.Ascending, Optional key3 As String = Nothing, Optional order3 As SortOrder = SortOrder.Ascending, Optional header As YesNoGuess = YesNoGuess.No, Optional matchCase As Boolean = False, Optional sortMethod As SortMethod = SortMethod.PinYin, Optional dataOption1 As SortDataOption = SortDataOption.Normal, Optional dataOption2 As SortDataOption = SortDataOption.Normal, Optional dataOption3 As SortDataOption = SortDataOption.Normal)
| Type | Name | Description |
|---|---|---|
| string | key1 | Specifies the first sort field, either as a range name string; determines the values to be sorted. |
| SortOrder | order1 | Determines the sort order for the values specified in |
| string | key2 | Second sort field; cannot be used when sorting a PivotTable. |
| SortType | type | Specifies which type of elements are to be sorted within a PivotTable. Specify SortLabels to sort by the labels targeted by the experession range in the Row/Colum Labels areas of the PivotTable's range, or SortValues when |
| SortOrder | order2 | Determines the sort order for the values specified in |
| string | key3 | Third sort field; cannot be used when sorting a PivotTable. |
| SortOrder | order3 | Determines the sort order for the values specified in |
| YesNoGuess | header | Specifies whether the first row contains header information. No is the default value; specify YesNoGuess if you want Spread to attempt to determine the header. |
| bool | matchCase | Set to true to perform a case-sensitive sort, false to perform a non-case-sensitive sort; cannot be used with PivotTables. |
| SortMethod | sortMethod | Specifies the sort method. |
| SortDataOption | dataOption1 | Specifies how to sort text in the range specified in |
| SortDataOption | dataOption2 | Specifies how to sort text in the range specified in |
| SortDataOption | dataOption3 | Specifies how to sort text in the range specified in |