REST Resource: spreadsheets

Resource: Spreadsheet

Resource that represents a spreadsheet.

JSON representation
{
  "spreadsheetId": string,
  "properties": {
    object (SpreadsheetProperties)
  },
  "sheets": [
    {
      object (Sheet)
    }
  ],
  "namedRanges": [
    {
      object (NamedRange)
    }
  ],
  "spreadsheetUrl": string,
  "developerMetadata": [
    {
      object (DeveloperMetadata)
    }
  ]
}
Fields
spreadsheetId

string

The ID of the spreadsheet. This field is read-only.

properties

object (SpreadsheetProperties)

Overall properties of a spreadsheet.

sheets[]

object (Sheet)

The sheets that are part of a spreadsheet.

namedRanges[]

object (NamedRange)

The named ranges defined in a spreadsheet.

spreadsheetUrl

string

The url of the spreadsheet. This field is read-only.

developerMetadata[]

object (DeveloperMetadata)

The developer metadata associated with a spreadsheet.

SpreadsheetProperties

Properties of a spreadsheet.

JSON representation
{
  "title": string,
  "locale": string,
  "autoRecalc": enum (RecalculationInterval),
  "timeZone": string,
  "defaultFormat": {
    object (CellFormat)
  },
  "iterativeCalculationSettings": {
    object (IterativeCalculationSettings)
  },
  "spreadsheetTheme": {
    object (SpreadsheetTheme)
  }
}
Fields
title

string

The title of the spreadsheet.

locale

string

The locale of the spreadsheet in one of the following formats:

  • an ISO 639-1 language code such as en

  • an ISO 639-2 language code such as fil, if no 639-1 code exists

  • a combination of the ISO language code and country code, such as en_US

Note: when updating this field, not all locales/languages are supported.

autoRecalc

enum (RecalculationInterval)

The amount of time to wait before volatile functions are recalculated.

timeZone

string

The time zone of the spreadsheet, in CLDR format such as America/New_York. If the time zone isn't recognized, this may be a custom time zone such as GMT-07:00.

defaultFormat

object (CellFormat)

The default format of all cells in the spreadsheet. CellData.effectiveFormat will not be set if the cell's format is equal to this default format. This field is read-only.

iterativeCalculationSettings

object (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

object (SpreadsheetTheme)

Theme applied to the spreadsheet.

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

integer

When iterative calculation is enabled, the maximum number of calculation rounds to perform.

convergenceThreshold

number

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 (ThemeColorPair)
    }
  ]
}
Fields
primaryFontFamily

string

/ Name of the primary font family.

themeColors[]

object (ThemeColorPair)

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 (ThemeColorType),
  "color": {
    object (ColorStyle)
  }
}
Fields
colorType

enum (ThemeColorType)

The type of the spreadsheet theme color.

color

object (ColorStyle)

The concrete color corresponding to the theme color type.

ThemeColorType

Theme color types.

SpreadsheetProperties contain a SpreadsheetTheme that defines a mapping of these theme color types to concrete colors.

Enums
THEME_COLOR_TYPE_UNSPECIFIED Unspecified theme color
TEXT Represents the primary text color
BACKGROUND Represents the primary background color
ACCENT1 Represents the first accent color
ACCENT2 Represents the second accent color
ACCENT3 Represents the third accent color
ACCENT4 Represents the fourth accent color
ACCENT5 Represents the fifth accent color
ACCENT6 Represents the sixth accent color

ColorStyle

A color value.

JSON representation
{

  // Union field kind can be only one of the following:
  "rgbColor": {
    object (Color)
  },
  "themeColor": enum (ThemeColorType)
  // End of list of possible types for union field kind.
}
Fields
Union field kind. The kind of color value. kind can be only one of the following:
rgbColor

object (Color)

RGB color.

themeColor

enum (ThemeColorType)

Theme color.

NamedRange

A named range.

JSON representation
{
  "namedRangeId": string,
  "name": string,
  "range": {
    object (GridRange)
  }
}
Fields
namedRangeId

string

The ID of the named range.

name

string

The name of the named range.

range

object (GridRange)

The range this represents.

Methods

batchUpdate

Applies one or more updates to the spreadsheet.

create

Creates a spreadsheet, returning the newly created spreadsheet.

get

Returns the spreadsheet at the given ID.

getByDataFilter

Returns the spreadsheet at the given ID.