Search results

SortDescriptor API in JavaScript (ES5) Spreadsheet API control

Specifies the criteria for sorting in a spreadsheet.

Properties

field

string

Specifies the column by which to sort. This is the name of the column or field on which sorting should be applied.

order

SortOrder

Specifies the sort order.

  • Ascending: Sorts the data from smallest to largest (A-Z, 1-10).
  • Descending: Sorts the data from largest to smallest (Z-A, 10-1).

sortComparer

Function

Specifies a function used to customize the sorting logic. You can use this function to define custom sorting rules beyond basic ascending or descending order.