[]
Specifies the orientation used when sorting a range.
Use this enum to indicate whether sorting is performed by rows or by columns. It is commonly used with Sort(IRange, SortOrder, SortOrientation, bool) and Orientation.
public enum SortOrientation
Public Enum SortOrientation
worksheet.Range["A1"].Value = 2;
worksheet.Range["A2"].Value = 1;
worksheet.Range["B1"].Value = "B";
worksheet.Range["B2"].Value = "A";
worksheet.Range["A1:B2"].Sort(worksheet.Range["A1:A2"], SortOrder.Ascending, SortOrientation.Columns);
| Name | Description |
|---|---|
| Columns | Specifies to sort by columns. |
| Rows | Specifies to sort by rows. |