存取及修改資料透視表中的值群組。
方法
| 方法 | 傳回類型 | 簡短說明 |
|---|---|---|
get | Pivot | 傳回顯示類型,說明這個樞紐分析表值目前在表格中的顯示方式。 |
get | String | 傳回用於計算這個值的公式。 |
get | Pivot | 傳回這個值所屬的 Pivot。 |
get | Integer | 傳回資料透視值匯總的來源資料欄數量。 |
get | Data | 傳回資料透視值匯總的資料來源資料欄。 |
get | Pivot | 傳回這個群組的摘要函式。 |
remove() | void | 從樞紐分析表中移除這個值。 |
set | Pivot | 設定樞紐分析表中這個值的顯示名稱。 |
set | Pivot | 設定用於計算這個值的公式。 |
show | Pivot | 在樞紐分析表中,將這個值顯示為另一個值的函式。 |
summarize | Pivot | 設定摘要函式。 |
內容詳盡的說明文件
get Display Type()
傳回顯示類型,說明這個樞紐分析表值目前在表格中的顯示方式。
回攻員
Pivot - 這個樞紐值的顯示類型
授權
使用這個方法的指令碼需要一或多個下列範圍的授權:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Formula()
傳回用於計算這個值的公式。如果這個值不是計算欄位,這個方法會傳回 null。
回攻員
String:用於串連的樞紐值
授權
使用這個方法的指令碼需要一或多個下列範圍的授權:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Pivot Table()
傳回這個值所屬的 Pivot。
回攻員
Pivot:這個值所屬的資料透視表
授權
使用這個方法的指令碼需要一或多個下列範圍的授權:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Source Data Column()
傳回資料透視值彙整的來源資料欄數量。這個索引是以 1 為基準,如果這個群組會彙整試算表「A」欄中的來源資料,這個方法會傳回 1。
回攻員
Integer - 來源資料欄編號。
授權
使用這個方法的指令碼需要一或多個下列範圍的授權:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Source Data Source Column()
傳回資料透視值匯總的資料來源資料欄。如果資料透視表不是 {DataSourcePivotTableApi},則傳回 null。
回攻員
Data:資料透視值匯總的來源資料來源資料欄。
授權
使用這個方法的指令碼需要一或多個下列範圍的授權:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Summarized By()
傳回這個群組的摘要函式。
回攻員
Pivot:群組的摘要函式
授權
使用這個方法的指令碼需要一或多個下列範圍的授權:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
remove()
從樞紐分析表中移除這個值。
授權
使用這個方法的指令碼需要一或多個下列範圍的授權:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
set Display Name(name)
設定樞紐分析表中這個值的顯示名稱。
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
name | String | 要設定的顯示名稱。 |
回攻員
Pivot:用於串連的樞紐值
授權
使用這個方法的指令碼需要一或多個下列範圍的授權:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
set Formula(formula)
設定用來計算這個值的公式。如果這個值不是計算欄位,這個方法就會導致錯誤。
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
formula | String | 用來計算這個值的公式。 |
回攻員
Pivot:用於串連的樞紐值
授權
使用這個方法的指令碼需要一或多個下列範圍的授權:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
show As(displayType)
在樞紐分析表中,將這個值顯示為另一個值的函式。
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
display | Pivot | 顯示值的方式。 |
回攻員
Pivot:用於串連的樞紐值
授權
使用這個方法的指令碼需要一或多個下列範圍的授權:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
summarize By(summarizeFunction)
設定摘要函式。
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
summarize | Pivot | 用來匯總此值來源資料欄中資料的函式。 |
回攻員
Pivot:用於串連的樞紐值
授權
使用這個方法的指令碼需要一或多個下列範圍的授權:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets