Table of Contents

Constructor XlsxSortKey

Namespace
DocWright.Spreadsheet
Assembly
DocWright.Spreadsheet.dll

XlsxSortKey(int, bool)

Creates a key.

public XlsxSortKey(int column, bool descending = false)

Parameters

column int

The one-based column of the sheet, inside the range sorted.

descending bool

Whether 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

column int

The one-based column of the sheet, inside the range sorted.

customOrder IEnumerable<string>

The items, such as Low, Medium, High; matched without regard to case.

descending bool

Whether the order is reversed.

Exceptions

ArgumentNullException

customOrder is null.

ArgumentException

customOrder is 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.