Constructor XlsxSortKey
- Namespace
- DocWright.Spreadsheet
- Assembly
- DocWright.Spreadsheet.dll
XlsxSortKey(int, bool)
Creates a key.
public XlsxSortKey(int column, bool descending = false)
Parameters
columnintThe one-based column of the sheet, inside the range sorted.
descendingboolWhether the largest value comes first.
Exceptions
- ArgumentOutOfRangeException
The column is outside the worksheet grid.
XlsxSortKey(int, IEnumerable<string>, bool)
Creates a key that orders text by a list: the list's items in the list's order, then everything else.
public XlsxSortKey(int column, IEnumerable<string> customOrder, bool descending = false)
Parameters
columnintThe one-based column of the sheet, inside the range sorted.
customOrderIEnumerable<string>The items, such as
Low,Medium,High; matched without regard to case.descendingboolWhether the order is reversed.
Exceptions
- ArgumentNullException
customOrderis null.- ArgumentException
customOrderis empty, holds a null or empty item, or holds a comma (Excel stores the list with commas between its items).- ArgumentOutOfRangeException
The column is outside the worksheet grid.