- Resource: Spreadsheet
- SpreadsheetProperties
- RecalculationInterval
- CellFormat
- NumberFormat
- NumberFormatType
- Color
- ColorStyle
- ThemeColorType
- Borders
- Border
- Style
- Padding
- HorizontalAlign
- VerticalAlign
- WrapStrategy
- TextDirection
- TextFormat
- Link
- HyperlinkDisplayType
- TextRotation
- IterativeCalculationSettings
- SpreadsheetTheme
- ThemeColorPair
- Sheet
- 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
- Chip
- PersonProperties
- DisplayFormat
- RichLinkProperties
- DimensionProperties
- ConditionalFormatRule
- BooleanRule
- GradientRule
- InterpolationPoint
- InterpolationPointType
- FilterView
- ProtectedRange
- Editors
- 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
- Slicer
- SlicerSpec
- Table
- TableRowsProperties
- TableColumnProperties
- ColumnType
- TableColumnDataValidationRule
- CommentAnchor
- NamedRange
- DataSource
- DataSourceSpec
- BigQueryDataSourceSpec
- BigQueryQuerySpec
- BigQueryTableSpec
- LookerDataSourceSpec
- DataSourceParameter
- DataSourceRefreshSchedule
- DataSourceRefreshScope
- DataSourceRefreshDailySchedule
- TimeOfDay
- DataSourceRefreshWeeklySchedule
- DayOfWeek
- DataSourceRefreshMonthlySchedule
- Interval
- CommentThread
- Post
- PostAuthor
- CommentActionType
- Status
- CommentsViewMode
- Methods
Resource: Spreadsheet
Resource that represents a spreadsheet.
| JSON representation |
|---|
{ "spreadsheetId": string, "properties": { object ( |
| Fields | |
|---|---|
spreadsheetId |
The ID of the spreadsheet. This field is read-only. |
properties |
Overall properties of a spreadsheet. |
sheets[] |
The sheets that are part of a spreadsheet. |
namedRanges[] |
The named ranges defined in a spreadsheet. |
spreadsheetUrl |
The url of the spreadsheet. This field is read-only. |
developerMetadata[] |
The developer metadata associated with a spreadsheet. |
dataSources[] |
A list of external data sources connected with the spreadsheet. |
dataSourceSchedules[] |
Output only. A list of data source refresh schedules. |
comments[] |
The comment threads associated with the spreadsheet. |
commentsViewMode |
Output only. The comments view mode applied to the spreadsheet. |
SpreadsheetProperties
Properties of a spreadsheet.
| JSON representation |
|---|
{ "title": string, "locale": string, "autoRecalc": enum ( |
| Fields | |
|---|---|
title |
The title of the spreadsheet. |
locale |
The locale of the spreadsheet in one of the following formats:
Note: when updating this field, not all locales/languages are supported. |
autoRecalc |
The amount of time to wait before volatile functions are recalculated. |
timeZone |
The time zone of the spreadsheet, in CLDR format such as |
defaultFormat |
The default format of all cells in the spreadsheet. |
iterativeCalculationSettings |
Determines whether and how circular references are resolved with iterative calculation. Absence of this field means that circular references result in calculation errors. |
spreadsheetTheme |
Theme applied to the spreadsheet. |
importFunctionsExternalUrlAccessAllowed |
Whether to allow external URL access for image and import functions. Read only when true. When false, you can set to true. This value will be bypassed and always return true if the admin has enabled the allowlisting feature. |
RecalculationInterval
An enumeration of the possible recalculation interval options.
| Enums | |
|---|---|
RECALCULATION_INTERVAL_UNSPECIFIED |
Default value. This value must not be used. |
ON_CHANGE |
Volatile functions are updated on every change. |
MINUTE |
Volatile functions are updated on every change and every minute. |
HOUR |
Volatile functions are updated on every change and hourly. |
IterativeCalculationSettings
Settings to control how circular dependencies are resolved with iterative calculation.
| JSON representation |
|---|
{ "maxIterations": integer, "convergenceThreshold": number } |
| Fields | |
|---|---|
maxIterations |
When iterative calculation is enabled, the maximum number of calculation rounds to perform. |
convergenceThreshold |
When iterative calculation is enabled and successive results differ by less than this threshold value, the calculation rounds stop. |
SpreadsheetTheme
Represents spreadsheet theme
| JSON representation |
|---|
{
"primaryFontFamily": string,
"themeColors": [
{
object ( |
| Fields | |
|---|---|
primaryFontFamily |
Name of the primary font family. |
themeColors[] |
The spreadsheet theme color pairs. To update you must provide all theme color pairs. |
ThemeColorPair
A pair mapping a spreadsheet theme color type to the concrete color it represents.
| JSON representation |
|---|
{ "colorType": enum ( |
| Fields | |
|---|---|
colorType |
The type of the spreadsheet theme color. |
color |
The concrete color corresponding to the theme color type. |
NamedRange
A named range.
| JSON representation |
|---|
{
"namedRangeId": string,
"name": string,
"range": {
object ( |
| Fields | |
|---|---|
namedRangeId |
The ID of the named range. |
name |
The name of the named range. |
range |
The range this represents. |
DataSource
Information about an external data source in the spreadsheet.
| JSON representation |
|---|
{ "dataSourceId": string, "spec": { object ( |
| Fields | |
|---|---|
dataSourceId |
The spreadsheet-scoped unique ID that identifies the data source. Example: 1080547365. |
spec |
The |
calculatedColumns[] |
All calculated columns in the data source. |
sheetId |
The ID of the When creating a data source, an associated |
DataSourceSpec
This specifies the details of the data source. For example, for BigQuery, this specifies information about the BigQuery source.
| JSON representation |
|---|
{ "parameters": [ { object ( |
| Fields | |
|---|---|
parameters[] |
The parameters of the data source, used when querying the data source. |
Union field spec. The actual specification per data source type. spec can be only one of the following: |
|
bigQuery |
|
looker |
A [LookerDatasourceSpec][]. |
BigQueryDataSourceSpec
The specification of a BigQuery data source that's connected to a sheet.
| JSON representation |
|---|
{ "projectId": string, "querySpec": { object ( |
| Fields | |
|---|---|
projectId |
The ID of a BigQuery enabled Google Cloud project with a billing account attached. For any queries executed against the data source, the project is charged. |
Union field spec. The actual specification. spec can be only one of the following: |
|
querySpec |
|
tableSpec |
|
BigQueryQuerySpec
Specifies a custom BigQuery query.
| JSON representation |
|---|
{ "rawQuery": string } |
| Fields | |
|---|---|
rawQuery |
The raw query string. |
BigQueryTableSpec
Specifies a BigQuery table definition. Only native tables are allowed.
| JSON representation |
|---|
{ "tableProjectId": string, "tableId": string, "datasetId": string } |
| Fields | |
|---|---|
tableProjectId |
The ID of a BigQuery project the table belongs to. If not specified, the |
tableId |
The BigQuery table id. |
datasetId |
The BigQuery dataset id. |
LookerDataSourceSpec
The specification of a Looker data source.
| JSON representation |
|---|
{ "instanceUri": string, "model": string, "explore": string } |
| Fields | |
|---|---|
instanceUri |
A Looker instance URL. |
model |
Name of a Looker model. |
explore |
Name of a Looker model explore. |
DataSourceParameter
A parameter in a data source's query. The parameter allows the user to pass in values from the spreadsheet into a query.
| JSON representation |
|---|
{
"name": string
"namedRangeId": string,
"range": {
object ( |
| Fields | |
|---|---|
Union field identifier. The parameter identifier. identifier can be only one of the following: |
|
name |
Named parameter. Must be a legitimate identifier for the |
Union field value. The parameter value. value can be only one of the following: |
|
namedRangeId |
ID of a |
range |
A range that contains the value of the parameter. Its size must be 1x1. |
DataSourceRefreshSchedule
Schedule for refreshing the data source.
Data sources in the spreadsheet are refreshed within a time interval. You can specify the start time by clicking the Scheduled Refresh button in the Sheets editor, but the interval is fixed at 4 hours. For example, if you specify a start time of 8 AM , the refresh will take place between 8 AM and 12 PM every day.
| JSON representation |
|---|
{ "enabled": boolean, "refreshScope": enum ( |
| Fields | |
|---|---|
enabled |
True if the refresh schedule is enabled, or false otherwise. |
refreshScope |
The scope of the refresh. Must be |
nextRun |
Output only. The time interval of the next run. |
Union field schedule_config. Schedule configurations schedule_config can be only one of the following: |
|
dailySchedule |
Daily refresh schedule. |
weeklySchedule |
Weekly refresh schedule. |
monthlySchedule |
Monthly refresh schedule. |
DataSourceRefreshScope
The data source refresh scopes.
| Enums | |
|---|---|
DATA_SOURCE_REFRESH_SCOPE_UNSPECIFIED |
Default value, do not use. |
ALL_DATA_SOURCES |
Refreshes all data sources and their associated data source objects in the spreadsheet. |
DataSourceRefreshDailySchedule
A schedule for data to refresh every day in a given time interval.
| JSON representation |
|---|
{
"startTime": {
object ( |
| Fields | |
|---|---|
startTime |
The start time of a time interval in which a data source refresh is scheduled. Only |
TimeOfDay
Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and google.protobuf.Timestamp.
| JSON representation |
|---|
{ "hours": integer, "minutes": integer, "seconds": integer, "nanos": integer } |
| Fields | |
|---|---|
hours |
Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time. |
minutes |
Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59. |
seconds |
Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds. |
nanos |
Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999. |
DataSourceRefreshWeeklySchedule
A weekly schedule for data to refresh on specific days in a given time interval.
| JSON representation |
|---|
{ "startTime": { object ( |
| Fields | |
|---|---|
startTime |
The start time of a time interval in which a data source refresh is scheduled. Only |
daysOfWeek[] |
Days of the week to refresh. At least one day must be specified. |
DayOfWeek
Represents a day of the week.
| Enums | |
|---|---|
DAY_OF_WEEK_UNSPECIFIED |
The day of the week is unspecified. |
MONDAY |
Monday |
TUESDAY |
Tuesday |
WEDNESDAY |
Wednesday |
THURSDAY |
Thursday |
FRIDAY |
Friday |
SATURDAY |
Saturday |
SUNDAY |
Sunday |
DataSourceRefreshMonthlySchedule
A monthly schedule for data to refresh on specific days in the month in a given time interval.
| JSON representation |
|---|
{
"startTime": {
object ( |
| Fields | |
|---|---|
startTime |
The start time of a time interval in which a data source refresh is scheduled. Only |
daysOfMonth[] |
Days of the month to refresh. Only 1-28 are supported, mapping to the 1st to the 28th day. At least one day must be specified. |
Interval
Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive).
The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.
| JSON representation |
|---|
{ "startTime": string, "endTime": string } |
| Fields | |
|---|---|
startTime |
Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start. |
endTime |
Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end. |
CommentThread
Represents a single comment thread inside a spreadsheet.
| JSON representation |
|---|
{ "commentId": string, "anchorId": string, "headPost": { object ( |
| Fields | |
|---|---|
commentId |
The unique ID of the comment thread. |
anchorId |
The ID of the |
headPost |
The first post in the thread. |
replies[] |
Replies to the head post. |
status |
Whether the thread is open or resolved. |
Union field quote. The quoted text from the document when the comment was created. quote can be only one of the following: |
|
plainTextQuote |
The quoted text from the spreadsheet when the comment was created, formatted as plain-text. |
Post
Represents a single post in a comment thread.
| JSON representation |
|---|
{ "postId": string, "content": string, "contentHtml": string, "author": { object ( |
| Fields | |
|---|---|
postId |
Output only. The unique ID of the post. |
content |
The content of the post. Required to be non-empty if This text content will be handled similarly to comments created in the Sheets editor. It will have similar behaviors for formatting, notifications, etc. May not exceed 2048 UTF-8 code units. |
contentHtml |
Output only. The content of the post as HTML. |
author |
Output only. The user who created the post. |
createTime |
Output only. The time the post was created. |
updateTime |
Output only. The time the post was last updated. |
deleted |
Output only. Whether the post is deleted. If |
fromImportedSpreadsheet |
Output only. Whether the post is from an imported spreadsheet. This field cannot be set directly by callers. |
fromCopiedSpreadsheet |
Output only. Whether the post is from a copied spreadsheet. This field cannot be set directly by callers. |
assigneeEmail |
Optional. The email of the user who is being newly assigned to the thread as part of this post. Returns a 400 bad request error if:
|
commentAction |
Action taken as part of creating the post. |
PostAuthor
Represents a user who authored a comment post.
| JSON representation |
|---|
{ "displayName": string, "me": boolean, "anonymous": boolean, "user": string } |
| Fields | |
|---|---|
displayName |
The display name of the user. May be absent if the author is anonymous. |
me |
Whether the user is the authenticated user making the request. |
anonymous |
Whether the user is anonymous. |
user |
The resource name of the post author user, which can also be used to identify the user in the Google People API. Format: |
CommentActionType
The action taken with this reply to a comment thread.
| Enums | |
|---|---|
COMMENT_ACTION_TYPE_UNSPECIFIED |
Default value. This value is unused. |
NO_COMMENT_ACTION_CHANGE |
No action change in this post. |
RESOLVE |
This post resolves the thread. |
REOPEN |
This post reopens the thread. |
Status
The status options of the comment thread.
| Enums | |
|---|---|
STATUS_UNSPECIFIED |
Default value. This value is unused. |
OPEN |
The comment thread is open. |
RESOLVED |
The comment thread is resolved. |
CommentsViewMode
The comments view mode applied to the spreadsheet that indicates if comments are included. It provides options for reading the spreadsheet with or without comments and comment anchors.
| Enums | |
|---|---|
COMMENTS_VIEW_MODE_UNSPECIFIED |
The CommentsViewMode is unspecified; COMMENTS_VIEW_MODE_OMITTED is applied. |
COMMENTS_VIEW_MODE_DEFAULT_FOR_CURRENT_ACCESS |
The CommentsViewMode applied to the returned spreadsheet depends on the user's current access level. If the user only has view access, COMMENTS_VIEW_MODE_OMITTED is applied. Otherwise, COMMENTS_VIEW_MODE_INCLUDED is applied. |
COMMENTS_VIEW_MODE_OMITTED |
The returned spreadsheet has comments omitted. |
COMMENTS_VIEW_MODE_INCLUDED |
The returned spreadsheet has comments included. Requests to retrieve a spreadsheet using this mode will return a 403 error if the user does not have permission to view comments. |
Methods |
|
|---|---|
|
Applies one or more updates to the spreadsheet. |
|
Creates a spreadsheet, returning the newly created spreadsheet. |
|
Returns the spreadsheet at the given ID. |
|
Returns the spreadsheet at the given ID. |