Sheets

工作表

試算表中的工作表。

JSON 表示法
{
  "properties": {
    object (SheetProperties)
  },
  "data": [
    {
      object (GridData)
    }
  ],
  "merges": [
    {
      object (GridRange)
    }
  ],
  "conditionalFormats": [
    {
      object (ConditionalFormatRule)
    }
  ],
  "filterViews": [
    {
      object (FilterView)
    }
  ],
  "protectedRanges": [
    {
      object (ProtectedRange)
    }
  ],
  "basicFilter": {
    object (BasicFilter)
  },
  "charts": [
    {
      object (EmbeddedChart)
    }
  ],
  "bandedRanges": [
    {
      object (BandedRange)
    }
  ],
  "developerMetadata": [
    {
      object (DeveloperMetadata)
    }
  ],
  "rowGroups": [
    {
      object (DimensionGroup)
    }
  ],
  "columnGroups": [
    {
      object (DimensionGroup)
    }
  ],
  "slicers": [
    {
      object (Slicer)
    }
  ],
  "tables": [
    {
      object (Table)
    }
  ],
  "commentAnchors": [
    {
      object (CommentAnchor)
    }
  ]
}
欄位
properties

object (SheetProperties)

工作表的屬性。

data[]

object (GridData)

網格中的資料 (如果是網格工作表)。

傳回的 GridData 物件數量取決於這份試算表要求範圍的數量。舉例來說,如果這是代表 Sheet1,且試算表是使用範圍 Sheet1!A1:C10 和 Sheet1!D15:E20 要求,則第一個 GridData 會具有 startRow/startColumn 的 0,而第二個 GridData 則會具有 startRow 14 (以零為準的第 15 列) 和 startColumn 3 (以零為準的 D 欄)。

如果是工作表,您無法要求特定範圍,GridData 會包含所有值。DATA_SOURCE

merges[]

object (GridRange)

合併的範圍。

conditionalFormats[]

object (ConditionalFormatRule)

這個工作表中的條件式格式規則。

filterViews[]

object (FilterView)

這份試算表中的篩選器檢視畫面。

protectedRanges[]

object (ProtectedRange)

這張工作表中的受保護範圍。

basicFilter

object (BasicFilter)

這份工作表的篩選器 (如有)。

charts[]

object (EmbeddedChart)

這個工作表上每個圖表的規格。

bandedRanges[]

object (BandedRange)

這份試算表中的帶狀 (交替顏色) 範圍。

developerMetadata[]

object (DeveloperMetadata)

與工作表相關聯的開發人員中繼資料。

rowGroups[]

object (DimensionGroup)

這個工作表上的所有列群組,依範圍起始索引遞增排序,然後依群組深度排序。

columnGroups[]

object (DimensionGroup)

這個工作表上的所有欄群組,依範圍起始索引遞增排序,然後依群組深度排序。

slicers[]

object (Slicer)

這個工作表上的交叉分析篩選器。

tables[]

object (Table)

這個工作表中的表格。

commentAnchors[]

object (CommentAnchor)

這份工作表中的註解錨點。

SheetProperties

工作表的屬性。

JSON 表示法
{
  "sheetId": integer,
  "title": string,
  "index": integer,
  "sheetType": enum (SheetType),
  "gridProperties": {
    object (GridProperties)
  },
  "hidden": boolean,
  "tabColor": {
    object (Color)
  },
  "tabColorStyle": {
    object (ColorStyle)
  },
  "rightToLeft": boolean,
  "dataSourceSheetProperties": {
    object (DataSourceSheetProperties)
  }
}
欄位
sheetId

integer

工作表的 ID。不得為負值。設定後即無法變更這個欄位。

title

string

工作表的名稱。

index

integer

試算表中的工作表索引。新增或更新試算表屬性時,如果排除這個欄位,系統會將工作表新增或移至工作表清單的結尾。更新工作表索引或插入工作表時,系統會以「移動前」的索引為準。舉例來說,如果工作表有三張 (S1、S2、S3),如要將 S1 移到 S2 前面,索引就必須設為 2。如果要求的索引與工作表的目前索引相同,或是要求的新索引等於目前工作表索引 + 1,系統就會忽略工作表索引更新要求。

sheetType

enum (SheetType)

工作表類型。預設值為 GRID。設定後即無法變更這個欄位。

gridProperties

object (GridProperties)

如果這個工作表是格線,則為工作表的其他屬性。(如果工作表是物件工作表,內含圖表或圖片,則不會顯示這個欄位)。在非格線工作表上設定任何格線屬性都是錯誤的。

如果這個工作表是 DATA_SOURCE 工作表,這個欄位只會輸出,但包含的屬性會反映資料來源工作表在使用者介面中的顯示方式,例如 rowCount。

hidden

boolean

如果工作表在使用者介面中隱藏,則為 true;如果工作表顯示,則為 false。

tabColor
(deprecated)

object (Color)

UI 中分頁的顏色。已淘汰:請改用 tabColorStyle。

tabColorStyle

object (ColorStyle)

UI 中分頁的顏色。如果同時設定了 tabColor,系統會優先採用這個欄位。

rightToLeft

boolean

如果工作表是 RTL 工作表 (而非 LTR 工作表),則為 True。

dataSourceSheetProperties

object (DataSourceSheetProperties)

僅供輸出。如有這個欄位,則會包含 DATA_SOURCE 工作表專屬屬性。

SheetType

工作表類型。

列舉
SHEET_TYPE_UNSPECIFIED 預設值,請勿使用。
GRID 工作表是格線。
OBJECT 工作表沒有格線,而是包含圖表或圖片等物件。
DATA_SOURCE 工作表會連結外部 DataSource 並顯示資料預覽畫面。

GridProperties

格線的屬性。

JSON 表示法
{
  "rowCount": integer,
  "columnCount": integer,
  "frozenRowCount": integer,
  "frozenColumnCount": integer,
  "hideGridlines": boolean,
  "rowGroupControlAfter": boolean,
  "columnGroupControlAfter": boolean
}
欄位
rowCount

integer

格線中的列數。

columnCount

integer

格狀檢視畫面中的欄數。

frozenRowCount

integer

網格中凍結的列數。

frozenColumnCount

integer

格狀檢視畫面中凍結的欄數。

hideGridlines

boolean

如果格線未在 UI 中顯示格線,則為 True。

rowGroupControlAfter

boolean

如果群組後顯示列群組控制項切換按鈕,則為 True。

columnGroupControlAfter

boolean

如果群組後顯示欄群組控制項切換按鈕,則為 True。

DataSourceSheetProperties

工作表的其他屬性。DATA_SOURCE

JSON 表示法
{
  "dataSourceId": string,
  "columns": [
    {
      object (DataSourceColumn)
    }
  ],
  "dataExecutionStatus": {
    object (DataExecutionStatus)
  }
}
欄位
dataSourceId

string

與試算表連結的 ID。 DataSource

columns[]

object (DataSourceColumn)

試算表上顯示的資料欄,對應於 RowData 中的值。

dataExecutionStatus

object (DataExecutionStatus)

資料執行狀態。

GridData

格線中的資料,以及維度的中繼資料。

JSON 表示法
{
  "startRow": integer,
  "startColumn": integer,
  "rowData": [
    {
      object (RowData)
    }
  ],
  "rowMetadata": [
    {
      object (DimensionProperties)
    }
  ],
  "columnMetadata": [
    {
      object (DimensionProperties)
    }
  ]
}
欄位
startRow

integer

這個 GridData 參照的第一列 (以零為基準)。

startColumn

integer

這個 GridData 參照的第一欄 (從零開始)。

rowData[]

object (RowData)

格線中的資料,每列一個項目,從 startRow 中的列開始。RowData 中的值會對應至從 startColumn 開始的欄。

rowMetadata[]

object (DimensionProperties)

格線中要求資料列的中繼資料,從 startRow 中的資料列開始。

columnMetadata[]

object (DimensionProperties)

格線中要求欄的中繼資料,從 startColumn 中的欄開始。

RowData

資料列中每個儲存格的資料。

JSON 表示法
{
  "values": [
    {
      object (CellData)
    }
  ]
}
欄位
values[]

object (CellData)

資料列中的值,每個資料欄一個值。

DimensionProperties

維度的屬性。

JSON 表示法
{
  "hiddenByFilter": boolean,
  "hiddenByUser": boolean,
  "pixelSize": integer,
  "developerMetadata": [
    {
      object (DeveloperMetadata)
    }
  ],
  "dataSourceColumnReference": {
    object (DataSourceColumnReference)
  }
}
欄位
hiddenByFilter

boolean

如果這個維度正在篩選,則為 True。這是唯讀欄位。

hiddenByUser

boolean

如果這個維度已明確隱藏,則為 True。

pixelSize

integer

維度的高度 (如果是資料列) 或寬度 (如果是資料欄),以像素為單位。

developerMetadata[]

object (DeveloperMetadata)

與單列或單欄相關聯的開發人員中繼資料。

dataSourceColumnReference

object (DataSourceColumnReference)

僅供輸出。如果已設定,這是資料來源工作表中的資料欄。

ConditionalFormatRule

描述條件式格式的規則。

JSON 表示法
{
  "ranges": [
    {
      object (GridRange)
    }
  ],

  "booleanRule": {
    object (BooleanRule)
  },
  "gradientRule": {
    object (GradientRule)
  }
}
欄位
ranges[]

object (GridRange)

如果條件為 true,則格式化的範圍。所有範圍都必須位於同一個格線。

聯集欄位 rule。控制這項條件式格式的規則,必須設定一個選項。 rule 只能是下列其中一項:
booleanRule

object (BooleanRule)

格式為「on」或「off」,視規則而定。

gradientRule

object (GradientRule)

格式會因規則中的漸層而異。

BooleanRule

規則可能會相符,也可能不相符,視條件而定。

JSON 表示法
{
  "condition": {
    object (BooleanCondition)
  },
  "format": {
    object (CellFormat)
  }
}
欄位
condition

object (BooleanCondition)

規則的條件。如果條件評估結果為 true,系統就會套用格式。

format

object (CellFormat)

要套用的格式。條件式格式設定只能套用部分格式: bold、 italic、 strikethrough、 foreground color 和 background color。

GradientRule

這項規則會根據列出的插補點,套用漸層色階格式。儲存格的格式會因內容而異,與插補點的值不同。

JSON 表示法
{
  "minpoint": {
    object (InterpolationPoint)
  },
  "midpoint": {
    object (InterpolationPoint)
  },
  "maxpoint": {
    object (InterpolationPoint)
  }
}
欄位
minpoint

object (InterpolationPoint)

內插作業的起點。

midpoint

object (InterpolationPoint)

中間插補點 (選填)。

maxpoint

object (InterpolationPoint)

最終插補點。

InterpolationPoint

漸層條件式格式的單一插補點。這些圖釘會根據所選顏色、類型和值,固定漸層色階。

JSON 表示法
{
  "color": {
    object (Color)
  },
  "colorStyle": {
    object (ColorStyle)
  },
  "type": enum (InterpolationPointType),
  "value": string
}
欄位
color
(deprecated)

object (Color)

這個插補點應使用的顏色。已淘汰:請改用 colorStyle。

colorStyle

object (ColorStyle)

這個插補點應使用的顏色。如果同時設定了 color,系統會優先採用這個欄位。

type

enum (InterpolationPointType)

如何解讀值。

value

string

這個內插點使用的值。可能是公式。如果 type 是 MIN 或 MAX,則未使用。

InterpolationPointType

插補點的種類。

列舉
INTERPOLATION_POINT_TYPE_UNSPECIFIED 預設值,請勿使用。
MIN 插補點會使用條件式格式範圍內儲存格的最小值。
MAX 插補點會使用條件式格式範圍內儲存格的最大值。
NUMBER 插補點會完全使用 InterpolationPoint.value 中的值。
PERCENT

插補點是條件式格式範圍內所有儲存格的指定百分比。這相當於 NUMBER 如果值為: =(MAX(FLATTEN(range)) * (value / 100)) + (MIN(FLATTEN(range)) * (1 - (value / 100))) (其中範圍內的錯誤會在扁平化時遭到忽略)。

PERCENTILE 插補點是條件式格式範圍內所有儲存格的指定百分位數。這相當於 NUMBER 如果值為: =PERCENTILE(FLATTEN(range), value / 100) (其中範圍內的錯誤會在扁平化時遭到忽略)。

FilterView

篩選檢視畫面。詳情請參閱「使用篩選器管理資料顯示設定」。

JSON 表示法
{
  "filterViewId": integer,
  "title": string,
  "range": {
    object (GridRange)
  },
  "namedRangeId": string,
  "tableId": string,
  "sortSpecs": [
    {
      object (SortSpec)
    }
  ],
  "criteria": {
    integer: {
      object (FilterCriteria)
    },
    ...
  },
  "filterSpecs": [
    {
      object (FilterSpec)
    }
  ]
}
欄位
filterViewId

integer

篩選檢視畫面的 ID。

title

string

篩選檢視畫面名稱。

range

object (GridRange)

這個篩選檢視畫面涵蓋的範圍。

寫入時,只能設定 range、namedRangeId 或 tableId 其中之一。

namedRangeId

string

這個篩選檢視畫面所依據的已命名範圍 (如有)。

寫入時,只能設定 range、namedRangeId 或 tableId 其中之一。

tableId

string

這個篩選檢視畫面所依據的表格 (如有)。

寫入時,只能設定 range、namedRangeId 或 tableId 其中之一。

sortSpecs[]

object (SortSpec)

每個資料欄的排序順序。如果先前規格中的值相同,系統會使用後續規格。

criteria
(deprecated)

map (key: integer, value: object ( FilterCriteria))

顯示/隱藏每個資料欄值的條件。對應的鍵是資料欄索引,值則是該資料欄的條件。

這個欄位已淘汰,請改用 filterSpecs。

filterSpecs[]

object (FilterSpec)

篩選條件,用於顯示或隱藏每個資料欄的值。

回應中會填入 criteria 和 filterSpecs。如果更新要求中同時指定這兩個欄位,系統會優先採用這個欄位。

ProtectedRange

受保護的範圍。

JSON 表示法
{
  "protectedRangeId": integer,
  "range": {
    object (GridRange)
  },
  "namedRangeId": string,
  "tableId": string,
  "description": string,
  "warningOnly": boolean,
  "requestingUserCanEdit": boolean,
  "unprotectedRanges": [
    {
      object (GridRange)
    }
  ],
  "editors": {
    object (Editors)
  }
}
欄位
protectedRangeId

integer

受保護的範圍 ID。這是唯讀欄位。

range

object (GridRange)

受保護的範圍。範圍可能完全不受限制,在這種情況下,這會被視為受保護的工作表。

寫入時,只能設定 range、namedRangeId 或 tableId 其中之一。

namedRangeId

string

這個受保護範圍所依據的已命名範圍 (如有)。

寫入時,只能設定 range、namedRangeId 或 tableId 其中之一。

tableId

string

這個受保護的範圍所依據的資料表 (如有)。

寫入時,只能設定 range、namedRangeId 或 tableId 其中之一。

description

string

這個受保護範圍的說明。

warningOnly

boolean

如果編輯這個受保護的範圍時會顯示警告,則為 True。如果保護範圍採用警告式保護,所有使用者都能編輯範圍內的資料,但系統會顯示警告訊息,要求使用者確認編輯作業。

寫入時:如果這個欄位為 true,系統會忽略 editors。此外,如果這個欄位從 true 變更為 false,且未設定 editors 欄位 (或未納入欄位遮罩),編輯者就會設為文件中的所有編輯者。

requestingUserCanEdit

boolean

如果要求存取這個受保護的範圍的使用者可以編輯受保護區域,則為 True。這是唯讀欄位。

unprotectedRanges[]

object (GridRange)

受保護的工作表中的未受保護範圍清單。未受保護的範圍只能在受保護的工作表中使用。

editors

object (Editors)

有權編輯受保護範圍的使用者和群組。只有具備受保護的範圍和文件編輯權限的使用者,才能看到這個欄位。編輯器不支援 warningOnly 保護機制。

編輯者

受保護的範圍的編輯者。

JSON 表示法
{
  "users": [
    string
  ],
  "groups": [
    string
  ],
  "domainUsersCanEdit": boolean
}
欄位
users[]

string

有權編輯受保護範圍的使用者電子郵件地址。

groups[]

string

有權編輯受保護範圍的群組電子郵件地址。

domainUsersCanEdit

boolean

如果文件網域中的任何人都有受保護範圍的編輯權,則為 True。網域保護功能僅支援網域內的文件。

BasicFilter

與工作表相關聯的預設篩選器。詳情請參閱「使用篩選器管理資料顯示設定」。

JSON 表示法
{
  "range": {
    object (GridRange)
  },
  "tableId": string,
  "sortSpecs": [
    {
      object (SortSpec)
    }
  ],
  "criteria": {
    integer: {
      object (FilterCriteria)
    },
    ...
  },
  "filterSpecs": [
    {
      object (FilterSpec)
    }
  ]
}
欄位
range

object (GridRange)

篩選器涵蓋的範圍。

tableId

string

這個篩選器支援的資料表 (如有)。寫入時,只能設定 range 或 tableId 其中之一。

sortSpecs[]

object (SortSpec)

每個資料欄的排序順序。如果先前規格中的值相同,系統會使用後續規格。

criteria
(deprecated)

map (key: integer, value: object ( FilterCriteria))

顯示/隱藏每個資料欄值的條件。對應的鍵是資料欄索引,值則是該資料欄的條件。

這個欄位已淘汰,請改用 filterSpecs。

filterSpecs[]

object (FilterSpec)

每個資料欄的篩選條件。

回應中會填入 criteria 和 filterSpecs。如果更新要求中同時指定這兩個欄位,系統會優先採用這個欄位。

BandedRange

試算表中的帶狀 (交替顏色) 範圍。

JSON 表示法
{
  "bandedRangeId": integer,
  "bandedRangeReference": string,
  "range": {
    object (GridRange)
  },
  "rowProperties": {
    object (BandingProperties)
  },
  "columnProperties": {
    object (BandingProperties)
  }
}
欄位
bandedRangeId

integer

帶狀範圍的 ID。如果未設定,請參閱 bandedRangeReference。

bandedRangeReference

string

僅供輸出。用於識別 bandedRangeId 不支援的 ID。

range

object (GridRange)

這些屬性套用的範圍。

rowProperties

object (BandingProperties)

資料列帶狀格線的屬性。這些屬性會套用至範圍內的所有列。至少須指定 rowProperties 或 columnProperties 其中一項。

columnProperties

object (BandingProperties)

資料欄帶的屬性。這些屬性會套用至範圍內的所有資料欄。至少須指定 rowProperties 或 columnProperties 其中一項。

BandingProperties

參照單一維度 (資料列或資料欄) 的屬性。如果同時設定 BandedRange.row_properties 和 BandedRange.column_properties,系統會根據下列規則將填滿顏色套用至儲存格:

舉例來說,第一列的顏色優先於第一欄的顏色,但第一欄的顏色優先於第二列的顏色。同樣地,左上角儲存格中的列標題優先於欄標題,但如果未設定列標題,則欄標題優先於第一列顏色。

JSON 表示法
{
  "headerColor": {
    object (Color)
  },
  "headerColorStyle": {
    object (ColorStyle)
  },
  "firstBandColor": {
    object (Color)
  },
  "firstBandColorStyle": {
    object (ColorStyle)
  },
  "secondBandColor": {
    object (Color)
  },
  "secondBandColorStyle": {
    object (ColorStyle)
  },
  "footerColor": {
    object (Color)
  },
  "footerColorStyle": {
    object (ColorStyle)
  }
}
欄位
headerColor
(deprecated)

object (Color)

第一列或第一欄的顏色。如果設定這個欄位,第一列或第一欄會填入這個顏色,且從第二列或第二欄開始,顏色會交替使用 firstBandColor 和 secondBandColor。否則,第一列或第一欄會填入 firstBandColor,顏色會照常交替。已淘汰:請改用 headerColorStyle。

headerColorStyle

object (ColorStyle)

第一列或第一欄的顏色。如果設定這個欄位,第一列或第一欄會填入這個顏色,且從第二列或第二欄開始,顏色會交替使用 firstBandColor 和 secondBandColor。否則,第一列或第一欄會填入 firstBandColor,顏色會照常交替。如果同時設定了 headerColor,系統會優先採用這個欄位。

firstBandColor
(deprecated)

object (Color)

第一個交替顏色。(必要) 已淘汰:請改用 firstBandColorStyle。

firstBandColorStyle

object (ColorStyle)

第一個交替顏色。(必填) 如果同時設定 firstBandColor,系統會優先採用這個欄位。

secondBandColor
(deprecated)

object (Color)

交替顯示的第二個顏色。(必要) 已淘汰:請改用 secondBandColorStyle。

secondBandColorStyle

object (ColorStyle)

交替顯示的第二個顏色。(必填) 如果同時設定 secondBandColor,系統會優先採用這個欄位。

footerColor
(deprecated)

object (Color)

最後一列或最後一欄的顏色。如果未設定這個欄位,系統會根據前一列或前一行顏色,在最後一列或最後一行填入 firstBandColor 或 secondBandColor。已淘汰:請改用 footerColorStyle。

footerColorStyle

object (ColorStyle)

最後一列或最後一欄的顏色。如果未設定這個欄位,系統會根據前一列或前一行顏色,在最後一列或最後一行填入 firstBandColor 或 secondBandColor。如果同時設定了 footerColor,系統會優先採用這個欄位。

DimensionGroup

工作表上某個列或欄間隔的群組,可包含其他群組或包含在其他群組中。您可以在工作表上以單元的形式收合或展開群組。

JSON 表示法
{
  "range": {
    object (DimensionRange)
  },
  "depth": integer,
  "collapsed": boolean
}
欄位
range

object (DimensionRange)

這個群組存在的範圍。

depth

integer

群組的深度,代表有多少群組的範圍完全包含這個群組的範圍。

collapsed

boolean

如果這個群組已收合,這個欄位會設為 true。如果展開較淺深度的重疊群組,收合的群組仍會保持收合狀態。

由於維度的顯示狀態可獨立於這個群組屬性變更,因此即使值為 true,也不代表群組內的所有維度都會隱藏。不過,更新這項屬性時,如果這個欄位為 true,其中的所有維度都會設為隱藏;如果這個欄位為 false,則會設為顯示。

篩選器控制項

工作表中的篩選器控制項。

JSON 表示法
{
  "slicerId": integer,
  "spec": {
    object (SlicerSpec)
  },
  "position": {
    object (EmbeddedObjectPosition)
  }
}
欄位
slicerId

integer

篩選器的 ID。

spec

object (SlicerSpec)

切片器的規格。

position

object (EmbeddedObjectPosition)

滑桿的位置。請注意,只能將篩選器放在現有工作表上。此外,系統也會自動調整篩選器的寬度和高度,確保篩選器在允許的範圍內。

SlicerSpec

切片器的規格。

JSON 表示法
{
  "dataRange": {
    object (GridRange)
  },
  "filterCriteria": {
    object (FilterCriteria)
  },
  "columnIndex": integer,
  "applyToPivotTables": boolean,
  "title": string,
  "textFormat": {
    object (TextFormat)
  },
  "backgroundColor": {
    object (Color)
  },
  "backgroundColorStyle": {
    object (ColorStyle)
  },
  "horizontalAlignment": enum (HorizontalAlign)
}
欄位
dataRange

object (GridRange)

篩選器的資料範圍。

filterCriteria

object (FilterCriteria)

篩選器控制項的篩選條件。

columnIndex

integer

篩選器套用的資料表欄索引,從零開始。

applyToPivotTables

boolean

如果篩選器應套用至資料透視表,則為 True。如未設定,則預設為 True。

title

string

篩選器的標題。

textFormat

object (TextFormat)

在篩選器中顯示的標題文字格式。系統不支援連結欄位。

backgroundColor
(deprecated)

object (Color)

篩選器的背景顏色。已淘汰:請改用 backgroundColorStyle。

backgroundColorStyle

object (ColorStyle)

篩選器的背景顏色。如果同時設定了 backgroundColor,系統會優先採用這個欄位。

horizontalAlignment

enum (HorizontalAlign)

篩選器中標題的水平對齊方式。如未指定,則預設為 LEFT

表格

表格。

JSON 表示法
{
  "tableId": string,
  "name": string,
  "range": {
    object (GridRange)
  },
  "rowsProperties": {
    object (TableRowsProperties)
  },
  "columnProperties": [
    {
      object (TableColumnProperties)
    }
  ]
}
欄位
tableId

string

資料表的 ID。

name

string

資料表名稱。同一試算表中的所有資料表都有專屬 ID。

range

object (GridRange)

表格範圍。

rowsProperties

object (TableRowsProperties)

資料表列屬性。

columnProperties[]

object (TableColumnProperties)

資料表資料欄屬性。

TableRowsProperties

資料表列屬性。

JSON 表示法
{
  "headerColorStyle": {
    object (ColorStyle)
  },
  "firstBandColorStyle": {
    object (ColorStyle)
  },
  "secondBandColorStyle": {
    object (ColorStyle)
  },
  "footerColorStyle": {
    object (ColorStyle)
  }
}
欄位
headerColorStyle

object (ColorStyle)

標題列的顏色。如果設定這個欄位,標題列會填入指定的顏色。否則標題列會填入預設顏色。

firstBandColorStyle

object (ColorStyle)

第一個交替顏色。如果設定這個欄位,系統會以指定顏色填滿第一個帶狀資料列。否則,系統會以預設顏色填滿第一個帶狀資料列。

secondBandColorStyle

object (ColorStyle)

交替顯示的第二個顏色。如果設定這個欄位,第二個帶狀資料列會填入指定顏色。否則,第二個帶狀列會填入預設顏色。

footerColorStyle

object (ColorStyle)

最後一列的顏色。如果未設定這個欄位,系統就不會新增頁尾,最後一列會填入 firstBandColorStyle 或 secondBandColorStyle,視前一列的顏色而定。如果更新現有資料表,並新增頁尾,範圍會擴展 1 列。如果更新現有資料表並移除頁尾,範圍會縮減 1 列。

TableColumnProperties

資料表欄。

JSON 表示法
{
  "columnIndex": integer,
  "columnName": string,
  "columnType": enum (ColumnType),
  "dataValidationRule": {
    object (TableColumnDataValidationRule)
  }
}
欄位
columnIndex

integer

從 0 開始的資料欄索引。這個索引是相對於資料表中的位置,不一定與試算表中的欄索引相同。

columnName

string

資料欄名稱。

columnType

enum (ColumnType)

資料欄類型。

dataValidationRule

object (TableColumnDataValidationRule)

資料欄資料驗證規則。僅適用於下拉式選單資料欄類型。

ColumnType

資料表中特定資料欄的資料欄類型。

列舉
COLUMN_TYPE_UNSPECIFIED 未指定欄類型。
DOUBLE 數字資料欄類型。
CURRENCY 貨幣資料欄類型。
PERCENT 百分比資料欄類型。
DATE 日期資料欄類型。
TIME 時間資料欄類型。
DATE_TIME 日期和時間資料欄類型。
TEXT 文字資料欄類型。
BOOLEAN 布林值資料欄類型。
DROPDOWN 下拉式選單資料欄類型。
FILES_CHIP 檔案方塊資料欄類型
PEOPLE_CHIP 使用者方塊資料欄類型
FINANCE_CHIP 財經方塊資料欄類型
PLACE_CHIP 地點方塊資料欄類型
RATINGS_CHIP 評分方塊資料欄類型

TableColumnDataValidationRule

資料表欄的資料驗證規則。

JSON 表示法
{
  "condition": {
    object (BooleanCondition)
  }
}
欄位
condition

object (BooleanCondition)

儲存格資料必須符合的條件。只有在 [BooleanCondition.type] 為 ONE_OF_LIST 時才有效。

CommentAnchor

試算表中的位置與相同的 CommentThread anchorId 相關聯。注意:多個錨點可能會參照相同位置。

JSON 表示法
{
  "anchorId": string,
  "range": {
    object (GridRange)
  }
}
欄位
anchorId

string

留言錨點的專屬 ID。僅供輸出。

range

object (GridRange)

這個註解錨定在試算表中的座標範圍。