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