存取及修改現有主題。如要在試算表中設定主題,請使用 Spreadsheet.setSpreadsheetTheme(theme)。
方法
| 方法 | 傳回類型 | 簡短說明 | 
|---|---|---|
| get | Color | 針對有效的主題顏色類型傳回具體 Color。 | 
| get | String | 傳回主題的字型系列,如果是 null主題,則傳回null。 | 
| get | Theme | 傳回目前主題的所有可能的主題顏色類型清單。 | 
| set | Spreadsheet | 將與此色彩配置中的 Theme相關聯的具體顏色設為指定顏色。 | 
| set | Spreadsheet | 將與此色彩配置中的 Theme相關聯的具體顏色設為 RGB 格式的指定顏色。 | 
| set | Spreadsheet | 設定主題的字型系列。 | 
內容詳盡的說明文件
get
針對有效的主題顏色類型傳回具體 Color。如果主題顏色類型未在目前主題中設定,則會擲回例外狀況。
參數
| 名稱 | 類型 | 說明 | 
|---|---|---|
| theme | Theme | 主題顏色類型。 | 
回攻員
Color:混凝土顏色。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
get
傳回主題的字型系列,如果是 null 主題,則傳回 null。
回攻員
String:主題字型系列。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
get
傳回目前主題的所有可能的主題顏色類型清單。
回攻員
Theme:主題顏色清單。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
set
將與此色彩配置中的 Theme 相關聯的具體顏色設為指定顏色。
參數
| 名稱 | 類型 | 說明 | 
|---|---|---|
| theme | Theme | 主題顏色類型。 | 
| color | Color | 顏色。 | 
回攻員
Spreadsheet:用於鏈結的主題。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
set
將與此色彩配置中的 Theme 相關聯的具體顏色設為 RGB 格式的指定顏色。
參數
| 名稱 | 類型 | 說明 | 
|---|---|---|
| theme | Theme | 主題顏色類型。 | 
| red | Integer | 紅色通道的值。 | 
| green | Integer | 綠色通道的值。 | 
| blue | Integer | 藍色通道的值。 | 
回攻員
Spreadsheet:用於鏈結的主題。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
set
設定主題的字型系列。
參數
| 名稱 | 類型 | 說明 | 
|---|---|---|
| font | String | 新的主題字型系列。 | 
回攻員
Spreadsheet:這個主題,用於鏈結。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets