存取及修改資料來源資料欄。
請只將這個類別用於與資料庫連結的資料。
方法
| 方法 | 傳回類型 | 簡短說明 | 
|---|---|---|
get | Data | 取得與資料來源欄相關聯的資料來源。 | 
get | String | 取得資料來源欄的公式。 | 
get | String | 取得資料來源欄的名稱。 | 
has | Boolean | 傳回資料欄是否有陣列依附元件。 | 
is | Boolean | 傳回資料欄是否為計算結果欄。 | 
remove() | void | 移除資料來源欄。 | 
set | Data | 設定資料來源欄的公式。 | 
set | Data | 設定資料來源欄的名稱。 | 
內容詳盡的說明文件
get Data Source()
取得與資料來源欄相關聯的資料來源。
回攻員
Data:資料來源。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly - 
https://www.googleapis.com/auth/spreadsheets 
get Formula()
取得資料來源欄的公式。如果資料來源欄不是 calculated column,則會傳回空白字串。
回攻員
String:公式。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly - 
https://www.googleapis.com/auth/spreadsheets 
get Name()
取得資料來源欄的名稱。
回攻員
String:資料欄名稱。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly - 
https://www.googleapis.com/auth/spreadsheets 
has Array Dependency()
傳回資料欄是否有陣列依附元件。
回攻員
Boolean:如果資料欄有陣列依附元件,則為 true;否則為 false。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly - 
https://www.googleapis.com/auth/spreadsheets 
is Calculated Column()
傳回資料欄是否為計算結果欄。
回攻員
Boolean:如果資料欄是計算結果欄,則為 true;如果不是,則為 false。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly - 
https://www.googleapis.com/auth/spreadsheets 
remove()
移除資料來源欄。
僅支援 calculated columns。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly - 
https://www.googleapis.com/auth/spreadsheets 
set Formula(formula)
設定資料來源欄的公式。
僅支援 calculated columns。
參數
| 名稱 | 類型 | 說明 | 
|---|---|---|
formula | String | 新公式。 | 
回攻員
Data:資料來源欄,用於鏈結。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly - 
https://www.googleapis.com/auth/spreadsheets 
set Name(name)
設定資料來源欄的名稱。
僅支援 calculated columns。
參數
| 名稱 | 類型 | 說明 | 
|---|---|---|
name | String | 要設定的名稱。 | 
回攻員
Data:資料來源欄,用於鏈結。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly - 
https://www.googleapis.com/auth/spreadsheets