- 資源:試算表
- SpreadsheetProperties
- RecalculationInterval
- CellFormat
- NumberFormat
- NumberFormatType
- 顏色
- ColorStyle
- ThemeColorType
- 邊框
- 邊框
- 樣式
- 邊框間距
- HorizontalAlign
- VerticalAlign
- WrapStrategy
- TextDirection
- TextFormat
- 連結
- HyperlinkDisplayType
- TextRotation
- IterativeCalculationSettings
- SpreadsheetTheme
- ThemeColorPair
- 工作表
- SheetProperties
- SheetType
- GridProperties
- DataSourceSheetProperties
- DataSourceColumn
- DataSourceColumnReference
- DataExecutionStatus
- DataExecutionState
- DataExecutionErrorCode
- GridData
- RowData
- CellData
- ExtendedValue
- ErrorValue
- ErrorType
- TextFormatRun
- DataValidationRule
- BooleanCondition
- ConditionType
- ConditionValue
- RelativeDate
- PivotTable
- GridRange
- PivotGroup
- PivotGroupValueMetadata
- SortOrder
- PivotGroupSortValueBucket
- PivotGroupRule
- ManualRule
- ManualRuleGroup
- HistogramRule
- DateTimeRule
- DateTimeRuleType
- PivotGroupLimit
- PivotFilterCriteria
- PivotFilterSpec
- PivotValue
- PivotValueSummarizeFunction
- PivotValueCalculatedDisplayType
- PivotValueLayout
- DataSourceTable
- DataSourceTableColumnSelectionType
- FilterSpec
- FilterCriteria
- SortSpec
- DataSourceFormula
- ChipRun
- 晶片
- PersonProperties
- DisplayFormat
- RichLinkProperties
- DimensionProperties
- ConditionalFormatRule
- BooleanRule
- GradientRule
- InterpolationPoint
- InterpolationPointType
- FilterView
- ProtectedRange
- 編輯者
- BasicFilter
- EmbeddedChart
- ChartSpec
- TextPosition
- DataSourceChartProperties
- BasicChartSpec
- BasicChartType
- BasicChartLegendPosition
- BasicChartAxis
- BasicChartAxisPosition
- ChartAxisViewWindowOptions
- ViewWindowMode
- BasicChartDomain
- ChartData
- ChartSourceRange
- ChartGroupRule
- ChartDateTimeRule
- ChartDateTimeRuleType
- ChartHistogramRule
- ChartAggregateType
- BasicChartSeries
- LineStyle
- LineDashType
- DataLabel
- DataLabelType
- DataLabelPlacement
- PointStyle
- PointShape
- BasicSeriesDataPointStyleOverride
- BasicChartStackedType
- BasicChartCompareMode
- PieChartSpec
- PieChartLegendPosition
- BubbleChartSpec
- BubbleChartLegendPosition
- CandlestickChartSpec
- CandlestickDomain
- CandlestickData
- CandlestickSeries
- OrgChartSpec
- OrgChartNodeSize
- HistogramChartSpec
- HistogramSeries
- HistogramChartLegendPosition
- WaterfallChartSpec
- WaterfallChartDomain
- WaterfallChartSeries
- WaterfallChartColumnStyle
- WaterfallChartCustomSubtotal
- WaterfallChartStackedType
- TreemapChartSpec
- TreemapChartColorScale
- ScorecardChartSpec
- KeyValueFormat
- BaselineValueFormat
- ComparisonType
- ChartNumberFormatSource
- ChartCustomNumberFormatOptions
- ChartHiddenDimensionStrategy
- EmbeddedObjectPosition
- OverlayPosition
- GridCoordinate
- EmbeddedObjectBorder
- BandedRange
- BandingProperties
- DimensionGroup
- 篩選器控制項
- SlicerSpec
- 資料表
- TableRowsProperties
- TableColumnProperties
- ColumnType
- TableColumnDataValidationRule
- CommentAnchor
- NamedRange
- DataSource
- DataSourceSpec
- BigQueryDataSourceSpec
- BigQueryQuerySpec
- BigQueryTableSpec
- LookerDataSourceSpec
- DataSourceParameter
- DataSourceRefreshSchedule
- DataSourceRefreshScope
- DataSourceRefreshDailySchedule
- TimeOfDay
- DataSourceRefreshWeeklySchedule
- DayOfWeek
- DataSourceRefreshMonthlySchedule
- 間隔
- CommentThread
- 貼文
- PostAuthor
- CommentActionType
- 狀態
- CommentsViewMode
- 方法
資源:試算表
代表試算表的資源。
| JSON 表示法 |
|---|
{ "spreadsheetId": string, "properties": { object ( |
| 欄位 | |
|---|---|
spreadsheetId |
試算表的 ID。這個欄位為唯讀。 |
properties |
試算表的整體屬性。 |
sheets[] |
試算表中的工作表。 |
namedRanges[] |
試算表中定義的已命名範圍。 |
spreadsheetUrl |
試算表網址。這個欄位為唯讀。 |
developerMetadata[] |
與試算表相關聯的開發人員中繼資料。 |
dataSources[] |
與試算表連結的外部資料來源清單。 |
dataSourceSchedules[] |
僅供輸出。資料來源重新整理時間表清單。 |
comments[] |
與試算表相關聯的註解串。 |
commentsViewMode |
僅供輸出。試算表套用的註解檢視模式。 |
SpreadsheetProperties
試算表的屬性。
| JSON 表示法 |
|---|
{ "title": string, "locale": string, "autoRecalc": enum ( |
| 欄位 | |
|---|---|
title |
試算表的標題。 |
locale |
試算表的語言代碼,採用下列其中一種格式:
注意:更新這個欄位時,系統僅支援部分語言/地區設定。 |
autoRecalc |
重新計算不穩定函式前要等待的時間量。 |
timeZone |
試算表的時區,採用 CLDR 格式,例如 |
defaultFormat |
試算表中所有儲存格的預設格式。如果儲存格格式與這個預設格式相同,系統就不會設定 |
iterativeCalculationSettings |
決定是否要以反覆運算方式解決循環參照問題,以及解決方式。如果沒有這個欄位,表示循環參照會導致計算錯誤。 |
spreadsheetTheme |
套用至試算表的主題。 |
importFunctionsExternalUrlAccessAllowed |
是否允許圖片和匯入函式存取外部網址。如果為 true,則為唯讀。如果為 false,您可以設為 true。如果管理員已啟用允許清單功能,系統會略過這個值,一律傳回 true。 |
RecalculationInterval
列舉可能的重新計算間隔選項。
| 列舉 | |
|---|---|
RECALCULATION_INTERVAL_UNSPECIFIED |
預設值。不得使用這個值。 |
ON_CHANGE |
易變函式會在每次變更時更新。 |
MINUTE |
易變函式會在每次變更和每分鐘更新。 |
HOUR |
易變函式會在每次變更時更新,每小時也會更新一次。 |
IterativeCalculationSettings
這些設定可控管如何以反覆運算方式解決循環相依性。
| JSON 表示法 |
|---|
{ "maxIterations": integer, "convergenceThreshold": number } |
| 欄位 | |
|---|---|
maxIterations |
啟用反覆運算時,要執行的計算輪數上限。 |
convergenceThreshold |
啟用反覆運算後,如果連續結果的差異小於這個門檻值,計算就會停止。 |
SpreadsheetTheme
代表試算表主題
| JSON 表示法 |
|---|
{
"primaryFontFamily": string,
"themeColors": [
{
object ( |
| 欄位 | |
|---|---|
primaryFontFamily |
主要字型系列的名稱。 |
themeColors[] |
試算表主題的顏色配對。如要更新,請提供所有主題顏色配對。 |
ThemeColorPair
將試算表主題顏色類型對應至代表該類型的具體顏色。
| JSON 表示法 |
|---|
{ "colorType": enum ( |
| 欄位 | |
|---|---|
colorType |
試算表主題顏色類型。 |
color |
對應主題顏色類型的具體顏色。 |
NamedRange
已命名範圍。
| JSON 表示法 |
|---|
{
"namedRangeId": string,
"name": string,
"range": {
object ( |
| 欄位 | |
|---|---|
namedRangeId |
已命名範圍的 ID。 |
name |
已命名範圍的名稱。 |
range |
代表的範圍。 |
DataSource
試算表中外部資料來源的相關資訊。
| JSON 表示法 |
|---|
{ "dataSourceId": string, "spec": { object ( |
| 欄位 | |
|---|---|
dataSourceId |
試算表範圍內可識別資料來源的專屬 ID。範例:1080547365。 |
spec |
與這個試算表連結的資料來源 |
calculatedColumns[] |
資料來源中的所有計算結果欄。 |
sheetId |
與資料來源連結的 建立資料來源時,系統也會建立相關聯的 |
DataSourceSpec
這會指定資料來源的詳細資料。舉例來說,如果是 BigQuery,這會指定 BigQuery 來源的相關資訊。
| JSON 表示法 |
|---|
{ "parameters": [ { object ( |
| 欄位 | |
|---|---|
parameters[] |
查詢資料來源時使用的資料來源參數。 |
| 各資料來源類型的實際規格。以下列出互斥欄位。回應中最多會設定一個欄位: | |
bigQuery |
|
looker |
[LookerDatasourceSpec][]。 |
| 互斥欄位的結尾。 | |
BigQueryDataSourceSpec
連結至工作表的 BigQuery 資料來源規格。
| JSON 表示法 |
|---|
{ "projectId": string, "querySpec": { object ( |
| 欄位 | |
|---|---|
projectId |
已啟用 BigQuery 且已附加帳單帳戶的 Google Cloud 專案 ID。針對資料來源執行的任何查詢,都會向專案收費。 |
| 實際規格。以下列出互斥欄位。回應中最多會設定一個欄位: | |
querySpec |
|
tableSpec |
|
| 互斥欄位的結尾。 | |
BigQueryQuerySpec
指定自訂 BigQuery 查詢。
| JSON 表示法 |
|---|
{ "rawQuery": string } |
| 欄位 | |
|---|---|
rawQuery |
原始查詢字串。 |
BigQueryTableSpec
指定 BigQuery 資料表定義。只能使用原生資料表。
| JSON 表示法 |
|---|
{ "tableProjectId": string, "tableId": string, "datasetId": string } |
| 欄位 | |
|---|---|
tableProjectId |
資料表所屬的 BigQuery 專案 ID。如未指定,系統會假設您使用的是 |
tableId |
BigQuery 資料表 ID。 |
datasetId |
BigQuery 資料集 ID。 |
LookerDataSourceSpec
Looker 資料來源的規格。
| JSON 表示法 |
|---|
{ "instanceUri": string, "model": string, "explore": string } |
| 欄位 | |
|---|---|
instanceUri |
Looker 執行個體網址。 |
model |
Looker 模型的名稱。 |
explore |
Looker 模型探索的名稱。 |
DataSourceParameter
資料來源查詢中的參數。使用者可透過參數將試算表中的值傳遞至查詢。
| JSON 表示法 |
|---|
{
"name": string
"namedRangeId": string,
"range": {
object ( |
| 欄位 | |
|---|---|
| 參數 ID。以下列出互斥欄位。回應中最多會設定一個欄位: | |
name |
具名參數。必須是支援 |
| 互斥欄位的結尾。 | |
| 參數值。以下列出互斥欄位。回應中最多會設定一個欄位: | |
namedRangeId |
|
range |
包含參數值的範圍。大小必須為 1x1。 |
| 互斥欄位的結尾。 | |
DataSourceRefreshSchedule
排定重新整理資料來源的時間。
試算表中的資料來源會在時間間隔內重新整理。您可以在 Google 試算表編輯器中點選「排定重新整理」按鈕,指定開始時間,但間隔固定為 4 小時。舉例來說,如果您指定開始時間為上午 8 點,系統每天會在上午 8 點到中午 12 點之間重新整理資料。
| JSON 表示法 |
|---|
{ "enabled": boolean, "refreshScope": enum ( |
| 欄位 | |
|---|---|
enabled |
如果已啟用重新整理時間表,則為 True,否則為 False。 |
refreshScope |
重新整理的範圍。必須為 |
nextRun |
僅供輸出。下次執行的時間間隔。 |
| 排程設定:以下列出互斥的欄位。回應中最多會設定一個欄位: | |
dailySchedule |
每日重新整理排程。 |
weeklySchedule |
每週更新時間表。 |
monthlySchedule |
每月更新時間表。 |
| 互斥欄位的結尾。 | |
DataSourceRefreshScope
資料來源重新整理範圍。
| 列舉 | |
|---|---|
DATA_SOURCE_REFRESH_SCOPE_UNSPECIFIED |
預設值,請勿使用。 |
ALL_DATA_SOURCES |
重新整理試算表中的所有資料來源和相關聯的資料來源物件。 |
DataSourceRefreshDailySchedule
排定在特定時間間隔內每天重新整理資料。
| JSON 表示法 |
|---|
{
"startTime": {
object ( |
| 欄位 | |
|---|---|
startTime |
排定重新整理資料來源的時間間隔開始時間。系統只會使用 |
TimeOfDay
代表一天中的時間。日期和時區並不需要指定,或是在其他位置上指定。API 可選擇允許閏秒。相關類型為 google.type.Date 和 google.protobuf.Timestamp。
| JSON 表示法 |
|---|
{ "hours": integer, "minutes": integer, "seconds": integer, "nanos": integer } |
| 欄位 | |
|---|---|
hours |
以 24 小時制表示一天的小時數。必須大於或等於 0,且通常必須小於或等於 23。API 可選擇允許使用「24:00:00」這類的值來表示營業打烊時間等情況。 |
minutes |
小時的第幾分鐘。必須大於或等於 0,且小於或等於 59。 |
seconds |
一分鐘內的第幾秒。必須大於或等於 0,且通常必須小於或等於 59。如果 API 允許閏秒,則可允許值為 60。 |
nanos |
以奈秒為單位的秒數分數。必須大於或等於 0,且小於或等於 999,999,999。 |
DataSourceRefreshWeeklySchedule
每週排程,在特定時間間隔的特定日子更新資料。
| JSON 表示法 |
|---|
{ "startTime": { object ( |
| 欄位 | |
|---|---|
startTime |
排定重新整理資料來源的時間間隔開始時間。系統只會使用 |
daysOfWeek[] |
要更新的星期幾。至少須指定一天。 |
DayOfWeek
代表星期幾。
| 列舉 | |
|---|---|
DAY_OF_WEEK_UNSPECIFIED |
未指定星期幾。 |
MONDAY |
星期一 |
TUESDAY |
週二 |
WEDNESDAY |
週三 |
THURSDAY |
週四 |
FRIDAY |
Friday (週五) |
SATURDAY |
Saturday (週六) |
SUNDAY |
星期日 |
DataSourceRefreshMonthlySchedule
每月排程,在特定時間間隔內,於每月的特定日期重新整理資料。
| JSON 表示法 |
|---|
{
"startTime": {
object ( |
| 欄位 | |
|---|---|
startTime |
排定重新整理資料來源的時間間隔開始時間。系統只會使用 |
daysOfMonth[] |
要更新的日期。系統僅支援 1 到 28,分別對應到第 1 天到第 28 天。至少須指定一天。 |
間隔
代表時間間隔,編碼以一個時間戳記開始 (含),一個時間戳記結束 (不含)。
開始時間必須小於或等於結束時間。如果開始時間等於結束時間,間隔會是空白 (不符合任何時間)。如果開始和結束時間都未指定,則間隔會符合任何時間。
| JSON 表示法 |
|---|
{ "startTime": string, "endTime": string } |
| 欄位 | |
|---|---|
startTime |
選填。間隔的開始時間 (含)。 如果指定了這個值,符合此間隔的時間戳記必須等於或晚於開始時間。 |
endTime |
(選用步驟) 間隔的結束時間 (不含)。 如果指定,符合這個間隔的時間戳記必須早於結束時間。 |
CommentThread
代表試算表中的單一註解討論串。
| JSON 表示法 |
|---|
{ "commentId": string, "anchorId": string, "headPost": { object ( |
| 欄位 | |
|---|---|
commentId |
留言串的專屬 ID。 |
anchorId |
這個討論串所連結的試算表 |
headPost |
討論串中的第一則貼文。 |
replies[] |
回覆主貼文。 |
status |
討論串是否已開啟或解決。 |
| 建立留言時,文件中的引文。以下列出互斥欄位。回應中最多會設定一個欄位: | |
plainTextQuote |
建立留言時試算表中的引文,格式為純文字。 |
| 互斥欄位的結尾。 | |
貼文
代表留言串中的單一留言。
| JSON 表示法 |
|---|
{ "postId": string, "content": string, "contentHtml": string, "author": { object ( |
| 欄位 | |
|---|---|
postId |
僅供輸出。貼文的專屬 ID。 |
content |
貼文內容。 如果 系統會以類似於在 Google 試算表編輯器中建立的註解方式處理這類文字內容。格式設定、通知等行為與舊版類似。 不得超過 2048 個 UTF-8 程式碼單元。 |
contentHtml |
僅供輸出。以 HTML 格式呈現的貼文內容。 |
author |
僅供輸出。發布貼文的使用者。 |
createTime |
僅供輸出。貼文的建立時間。 |
updateTime |
僅供輸出。貼文的上次更新時間。 |
deleted |
|
fromImportedSpreadsheet |
僅供輸出。貼文是否來自匯入的試算表。來電者無法直接設定這個欄位。 |
fromCopiedSpreadsheet |
僅供輸出。貼文是否來自複製的試算表。來電者無法直接設定這個欄位。 |
assigneeEmail |
(選用步驟) 這則貼文新指派給討論串的使用者電子郵件地址。 如果發生下列情況,系統會傳回 400 Bad Request 錯誤:
|
commentAction |
建立貼文時採取的動作。 |
PostAuthor
代表撰寫留言貼文的使用者。
| JSON 表示法 |
|---|
{ "displayName": string, "me": boolean, "anonymous": boolean, "user": string } |
| 欄位 | |
|---|---|
displayName |
使用者的顯示名稱。如果作者匿名,則可能不會顯示。 |
me |
使用者是否為提出要求的已驗證使用者。 |
anonymous |
使用者是否匿名。 |
user |
貼文作者的使用者資源名稱,也可以用來在 Google People API 中識別使用者。格式: |
CommentActionType
對留言討論串回覆所採取的動作。
| 列舉 | |
|---|---|
COMMENT_ACTION_TYPE_UNSPECIFIED |
預設值。這個值不會使用。 |
NO_COMMENT_ACTION_CHANGE |
這則貼文沒有任何動作變更。 |
RESOLVE |
這則貼文會解決該討論串的問題。 |
REOPEN |
這則貼文會重新開啟討論串。 |
狀態
留言串的狀態選項。
| 列舉 | |
|---|---|
STATUS_UNSPECIFIED |
預設值。這個值不會使用。 |
OPEN |
註解討論串已開啟。 |
RESOLVED |
註解討論串已解決。 |
CommentsViewMode
試算表套用的註解檢視模式,指出是否包含註解。您可以選擇是否要連同註解和註解錨點一起讀取試算表。
| 列舉 | |
|---|---|
COMMENTS_VIEW_MODE_UNSPECIFIED |
未指定 CommentsViewMode,因此套用 COMMENTS_VIEW_MODE_OMITTED。 |
COMMENTS_VIEW_MODE_DEFAULT_FOR_CURRENT_ACCESS |
系統會根據使用者目前的存取層級,將 CommentsViewMode 套用至傳回的試算表。如果使用者只有檢視權限,系統會套用 COMMENTS_VIEW_MODE_OMITTED。否則會套用 COMMENTS_VIEW_MODE_INCLUDED。 |
COMMENTS_VIEW_MODE_OMITTED |
系統傳回的試算表會省略註解。 |
COMMENTS_VIEW_MODE_INCLUDED |
傳回的試算表包含註解。 如果使用者沒有檢視留言的權限,使用這個模式擷取試算表的要求會傳回 403 錯誤。 |
方法 |
|
|---|---|
|
對試算表套用一或多項更新。 |
|
建立試算表,並傳回新建立的試算表。 |
|
傳回指定 ID 的試算表。 |
|
傳回指定 ID 的試算表。 |