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)
    }
  ]
}
欄位
properties

object (SheetProperties)

工作表的屬性。

data[]

object (GridData)

如果是網格工作表,則為網格中的資料。

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

對於 DATA_SOURCE 工作表,您無法要求特定範圍,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)

這個工作表上的表格。

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 試算表,這個欄位只會輸出,但包含反映資料來源試算表在 UI 中顯示方式的屬性,例如 rowCount

hidden

boolean

如果工作表在 UI 中隱藏,則傳回「是」;如果工作表可見,則傳回「否」。

tabColor
(deprecated)

object (Color)

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

tabColorStyle

object (ColorStyle)

UI 中分頁的顏色。如果同時設定了 tabColor,這個欄位的優先順序會高於 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 中顯示格線,則傳回「是」。

rowGroupControlAfter

boolean

如果在群組後方顯示列群組控制項切換鈕,則為「是」。

columnGroupControlAfter

boolean

如果在群組後方顯示欄組控制項切換鈕,則為「是」。

DataSourceSheetProperties

DATA_SOURCE 工作表的其他屬性。

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

string

工作表連結的 DataSource ID。

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)
    }
  ],

  // Union field rule can be only one of the following:
  "booleanRule": {
    object (BooleanRule)
  },
  "gradientRule": {
    object (GradientRule)
  }
  // End of list of possible types for union field rule.
}
欄位
ranges[]

object (GridRange)

如果條件為 true,則會對這些範圍套用格式。所有範圍都必須位於同一個格狀區塊。

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

object (BooleanRule)

格式化值會根據規則設為「開啟」或「關閉」。

gradientRule

object (GradientRule)

格式會因規則中的漸層而有所不同。

BooleanRule

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

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

object (BooleanCondition)

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

format

object (CellFormat)

要套用的格式。條件式格式只能套用部分格式:bolditalicstrikethroughforeground colorbackground 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,這個欄位的優先順序會高於 color

type

enum (InterpolationPointType)

如何解讀值。

value

string

這個內插點使用的值。可以是公式。如果 typeMINMAX,則未使用。

InterpolationPointType

插補點的類型。

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

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

PERCENTILE 插補點是指條件式格式範圍內所有儲存格中指定百分比的值。如果值為:=PERCENTILE(FLATTEN(range), value / 100),則相當於 NUMBER。在展開時,系統會忽略範圍中的錯誤。

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)

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

寫入時,只能設定 rangenamedRangeIdtableId 其中之一。

namedRangeId

string

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

寫入時,只能設定 rangenamedRangeIdtableId 其中之一。

tableId

string

這個篩選器檢視畫面的支援表格 (如果有的話)。

寫入時,只能設定 rangenamedRangeIdtableId 其中之一。

sortSpecs[]

object (SortSpec)

每個資料欄的排序順序。如果較早的規格中值相等,系統就會使用較新的規格。

criteria
(deprecated)

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

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

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

filterSpecs[]

object (FilterSpec)

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

回應中會填入 criteriafilterSpecs。如果更新要求中同時指定了這兩個欄位,則以這個欄位為優先。

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)

受保護的範圍。範圍可能完全不受限制,這類範圍視為受保護的工作表。

寫入時,只能設定 rangenamedRangeIdtableId 其中之一。

namedRangeId

string

這個受保護範圍的命名範圍 (如果有的話)。

寫入時,只能設定 rangenamedRangeIdtableId 其中之一。

tableId

string

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

寫入時,只能設定 rangenamedRangeIdtableId 其中之一。

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

這個篩選器所依據的資料表 (如果有)。寫入時,只能設定 rangetableId 其中之一。

sortSpecs[]

object (SortSpec)

每個資料欄的排序順序。如果較早的規格中值相等,系統就會使用較新的規格。

criteria
(deprecated)

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

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

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

filterSpecs[]

object (FilterSpec)

每個資料欄的篩選條件。

回應中會填入 criteriafilterSpecs。如果更新要求中同時指定了這兩個欄位,則以這個欄位為優先。

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)

列帶的屬性。這些屬性會逐列套用至指定範圍內的所有資料列。必須指定至少一個 rowPropertiescolumnProperties

columnProperties

object (BandingProperties)

資料欄區塊的屬性。這些屬性會逐一套用至範圍內的所有資料欄。必須指定至少一個 rowPropertiescolumnProperties

BandingProperties

屬性參照單一維度 (資料列或資料欄)。如果同時設定 BandedRange.row_propertiesBandedRange.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)

第一列或第一欄的顏色。如果已設定這個欄位,系統會在第一列或第一欄中填入這個顏色,並從第二列或第二欄開始,在 firstBandColorsecondBandColor 之間交替使用顏色。否則,第一列或第一欄會填入 firstBandColor,顏色會照常交替。已淘汰:請改用 headerColorStyle

headerColorStyle

object (ColorStyle)

第一列或第一欄的顏色。如果已設定這個欄位,系統會在第一列或第一欄中填入這個顏色,並從第二列或第二欄開始,在 firstBandColorsecondBandColor 之間交替使用顏色。否則,第一列或第一欄會填入 firstBandColor,顏色會照常交替。如果同時設定了 headerColor,這個欄位的優先順序會高於 headerColor

firstBandColor
(deprecated)

object (Color)

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

firstBandColorStyle

object (ColorStyle)

第一個交替顏色。(必要) 如果同時設定 firstBandColor,則這個欄位的優先順序會高於 firstBandColor

secondBandColor
(deprecated)

object (Color)

交錯的第二個顏色。(必要) 已淘汰:請使用 secondBandColorStyle

secondBandColorStyle

object (ColorStyle)

交錯的第二個顏色。(必要) 如果同時設定 secondBandColor,則這個欄位的優先順序會高於 secondBandColor

footerColor
(deprecated)

object (Color)

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

footerColorStyle

object (ColorStyle)

最後一列或欄的顏色。如果未設定這個欄位,系統會根據前一列或一欄的顏色,填入 firstBandColorsecondBandColor 填入最後一列或一欄。如果同時設定了 footerColor,這個欄位的優先順序會高於 footerColor

DimensionGroup

試算表中一組相鄰的資料列或資料欄,可包含或包含在其他群組內。群組可在工作表中以單位形式展開或收合。

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

object (DimensionRange)

這個群組的範圍。

depth

integer

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

collapsed

boolean

如果這個群組已摺疊,則這個欄位為「是」。如果展開較淺層級的重疊群組,已收合的群組仍會保持收合狀態。

值為「是」並不表示群組中的所有維度都會隱藏,因為維度的顯示設定可以獨立於這個群組屬性變更。不過,如果這個屬性更新,當這個欄位設為 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

資料表中要套用篩選器的資料欄,以 0 為索引。

applyToPivotTables

boolean

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

title

string

切片器的標題。

textFormat

object (TextFormat)

切片器中標題的文字格式。不支援連結欄位。

backgroundColor
(deprecated)

object (Color)

切片器的背景顏色。已淘汰:請改用 backgroundColorStyle

backgroundColorStyle

object (ColorStyle)

切片器的背景顏色。如果同時設定了 backgroundColor,這個欄位的優先順序會高於 backgroundColor

horizontalAlignment

enum (HorizontalAlign)

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

表格

表格。

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

string

資料表的 ID。

name

string

資料表名稱。這個值在同一試算表的所有資料表中皆不重複。

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)

最後一行的顏色。如果未設定這個欄位,系統就不會新增頁尾,而是根據前一列的顏色,將最後一列填入 firstBandColorStylesecondBandColorStyle。如果更新現有表格,並為其加上底欄,範圍會擴大 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 時才有效。