[]
Represents a sort field.
A sort field defines one sort key within a collection of sort conditions. It specifies the range used as the sort key, the priority used in multi-field sorting, and the sort type represented by a specific subinterface such as value, cell color, font color, or icon sorting. Sort fields are typically managed through SortFields.
public interface ISortField
Public Interface ISortField
worksheet.Range["A1:B4"].Value = new object[,] {
{"Name", "Score"},
{"Tom", 90},
{"Amy", 80},
{"Ken", 95}
};
ITable table = worksheet.Tables.Add(worksheet.Range["A1:B4"], true);
table.Sort.SortFields.Add(new ValueSortField(worksheet.Range["B1:B4"], SortOrder.Ascending));
ISortField sortField = table.Sort.SortFields[0];
sortField.Priority = 1;
| Name | Description |
|---|---|
| Key | Gets the sort key range. This property represents the range used as the sort key for this ISortField. |
| Priority | Gets or sets the priority of the ISortField. This value specifies the precedence of the sort field when multiple sort fields are used in the same sort operation. |
| SortOn | Gets the sort type. This value indicates the criterion used by the sort field, such as values, cell color, font color, or icons. |