Class SortSpec

排序規格

排序規格。

方法

方法傳回類型簡短說明
getBackgroundColor()Color|null傳回用於排序的背景顏色,如果沒有,則傳回 null
getDataSourceColumn()DataSourceColumn|null取得排序規格所作用的資料來源欄。
getDimensionIndex()Integer|null傳回維度索引,如果未連結至本機篩選器,則傳回 null
getForegroundColor()Color|null傳回用於排序的前景色,或如果沒有前景色,則傳回 null
getSortOrder()SortOrder傳回排序順序。
isAscending()Boolean傳回排序順序是否為遞增。

內容詳盡的說明文件

getBackgroundColor()

傳回用於排序的背景顏色,如果沒有,則傳回 null

回攻員

Color|null:背景顏色。

授權

使用這個方法的指令碼需要一或多個下列範圍的授權:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

getDataSourceColumn()

取得排序規格所作用的資料來源欄。如果這個排序規格不是作用於資料來源欄,則傳回 null

回攻員

DataSourceColumn|null:排序規格所作用的資料來源欄。

授權

使用這個方法的指令碼需要一或多個下列範圍的授權:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

getDimensionIndex()

傳回維度索引,如果未連結至本機篩選器,則傳回 null

回攻員

Integer|null:維度索引。

授權

使用這個方法的指令碼需要一或多個下列範圍的授權:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

getForegroundColor()

傳回用於排序的前景色,或如果沒有前景色,則傳回 null

回攻員

Color|null:前景顏色。

授權

使用這個方法的指令碼需要一或多個下列範圍的授權:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

getSortOrder()

傳回排序順序。

回攻員

SortOrder:排序順序。

授權

使用這個方法的指令碼需要一或多個下列範圍的授權:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

isAscending()

傳回排序順序是否為遞增。

回攻員

Boolean - 如果排序順序為遞增,則為 true,否則為 false

授權

使用這個方法的指令碼需要一或多個下列範圍的授權:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets