Skip to main content
Row

Worksheet.Sort Method

Name Parameters Description
Sort(CellRange, Fill, Boolean) range, fill, ascending Sorts the specified range by the specified color in the specified order.
Sort(CellRange, Fill) range, fill Sorts the specified range by the specified color in ascending order.
Sort(CellRange, Boolean) range, ascending Sorts the specified range by the first column.
Sort(CellRange, IEnumerable<SortFieldBase>) range, sortFields Sorts the specified range by multiple columns.
Sort(CellRange, Color, Boolean) range, fontColor, ascending Sorts the specified range by the font color in a specific order.
Sort(CellRange, Color) range, fontColor Sorts the specified range by the specified font color in ascending order.
Sort(CellRange, Int32, Fill, Boolean) range, columnOffset, fill, ascending Sorts the specified range by the fill color in a specific order. Allows you to specify column offset.
Sort(CellRange, Int32, Fill) range, columnOffset, fill Sorts the specified range by the fill color. Allows you to specify column offset.
Sort(CellRange, Int32, Boolean) range, columnOffset, ascending Sorts the specified range by the specified column.
Sort(CellRange, Int32, IComparer<CellValue>) range, columnOffset, comparer Sorts the specified range by the specified column using the specified comparer.
Sort(CellRange, Int32, Color, Boolean) range, columnOffset, fontColor, ascending Sorts the specified range by the font color in a specific order. Allows you to specify column offset.
Sort(CellRange, Int32, Color) range, columnOffset, fontColor Sorts the specified range by the background color. Allows you to specify column offset.
Sort(CellRange, Int32) range, columnOffset Sorts the specified range by the specified column in ascending order.
Sort(CellRange) range Sorts the specified range by the first column in ascending order.