[]
Specifies the sort order.
Use this enum to control how data is sorted, such as ascending or descending for value-based sorts, or top and bottom priority for other sort types.
public enum SortOrder
Public Enum SortOrder
worksheet.Range["A1:B4"].Value = new object[,] {
{2, "B"},
{1, "A"},
{3, "C"},
{1, "D"}
};
worksheet.Range["A1:B4"].Sort(worksheet.Range["A1:A4"], SortOrder.Ascending, SortOrientation.Columns);
| Name | Description |
|---|---|
| Ascending | Specifies the ascending or top sort value. |
| Descending | Specifies the descending or bottom sort value. |