ExcelRangeSort(Int32, ExcelSortOrder, Boolean) Method |
Sorts the rows of this range by a column. The values, formulas and cell formats move with the rows; the
relative references of the moved formulas are adjusted to the new row, as in Excel. Numbers and dates come
before texts, texts are compared without regard to case and the blank cells are placed last.
Formula cells are sorted by their calculated results (call
UpdateFormulaResult first for the formulas added in code). The range cannot contain merged cells.
Namespace: ExpertXls.ExcelLibAssembly: expertxls (in expertxls.dll) Version: 10.0.0
Syntaxpublic void Sort(
int columnIndex,
ExcelSortOrder order,
bool hasHeaderRow
)
Public Sub Sort (
columnIndex As Integer,
order As ExcelSortOrder,
hasHeaderRow As Boolean
)
Parameters
- columnIndex Int32
- The one based index of the column in the range.
- order ExcelSortOrder
- The sort order.
- hasHeaderRow Boolean
- True if the first row of the range is a header row that is not sorted.
See Also