The sorting specification.
Methods
Method | Return type | Brief description |
---|---|---|
get | Color | Returns the background color used for sorting, or null if absent. |
get | Data | Gets the data source column the sort spec acts on. |
get | Integer | Returns the dimension index or null if not linked to a local filter. |
get | Color | Returns the foreground color used for sorting, or null if absent. |
get | Sort | Returns the sort order. |
is | Boolean | Returns whether the sort order is ascending. |
Detailed documentation
getBackgroundColor()
Returns the background color used for sorting, or null
if absent.
Return
Color
— The background color.
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getDataSourceColumn()
Gets the data source column the sort spec acts on. Returns null
if this sort spec is
not acting on a data source column.
Return
Data
— The data source column the sort spec acts on.
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getDimensionIndex()
Returns the dimension index or null
if not linked to a local filter.
Return
Integer
— The dimension index.
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getForegroundColor()
Returns the foreground color used for sorting, or null
if absent.
Return
Color
— The foreground color.
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getSortOrder()
isAscending()
Returns whether the sort order is ascending.
Return
Boolean
— true
if the sort order is ascending, or false
otherwise.
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets