Requests

Request

A single kind of update to apply to a spreadsheet.

JSON representation
{

  // Union field kind can be only one of the following:
  "updateSpreadsheetProperties": {
    object(UpdateSpreadsheetPropertiesRequest)
  },
  "updateSheetProperties": {
    object(UpdateSheetPropertiesRequest)
  },
  "updateDimensionProperties": {
    object(UpdateDimensionPropertiesRequest)
  },
  "updateNamedRange": {
    object(UpdateNamedRangeRequest)
  },
  "repeatCell": {
    object(RepeatCellRequest)
  },
  "addNamedRange": {
    object(AddNamedRangeRequest)
  },
  "deleteNamedRange": {
    object(DeleteNamedRangeRequest)
  },
  "addSheet": {
    object(AddSheetRequest)
  },
  "deleteSheet": {
    object(DeleteSheetRequest)
  },
  "autoFill": {
    object(AutoFillRequest)
  },
  "cutPaste": {
    object(CutPasteRequest)
  },
  "copyPaste": {
    object(CopyPasteRequest)
  },
  "mergeCells": {
    object(MergeCellsRequest)
  },
  "unmergeCells": {
    object(UnmergeCellsRequest)
  },
  "updateBorders": {
    object(UpdateBordersRequest)
  },
  "updateCells": {
    object(UpdateCellsRequest)
  },
  "addFilterView": {
    object(AddFilterViewRequest)
  },
  "appendCells": {
    object(AppendCellsRequest)
  },
  "clearBasicFilter": {
    object(ClearBasicFilterRequest)
  },
  "deleteDimension": {
    object(DeleteDimensionRequest)
  },
  "deleteEmbeddedObject": {
    object(DeleteEmbeddedObjectRequest)
  },
  "deleteFilterView": {
    object(DeleteFilterViewRequest)
  },
  "duplicateFilterView": {
    object(DuplicateFilterViewRequest)
  },
  "duplicateSheet": {
    object(DuplicateSheetRequest)
  },
  "findReplace": {
    object(FindReplaceRequest)
  },
  "insertDimension": {
    object(InsertDimensionRequest)
  },
  "insertRange": {
    object(InsertRangeRequest)
  },
  "moveDimension": {
    object(MoveDimensionRequest)
  },
  "updateEmbeddedObjectPosition": {
    object(UpdateEmbeddedObjectPositionRequest)
  },
  "pasteData": {
    object(PasteDataRequest)
  },
  "textToColumns": {
    object(TextToColumnsRequest)
  },
  "updateFilterView": {
    object(UpdateFilterViewRequest)
  },
  "deleteRange": {
    object(DeleteRangeRequest)
  },
  "appendDimension": {
    object(AppendDimensionRequest)
  },
  "addConditionalFormatRule": {
    object(AddConditionalFormatRuleRequest)
  },
  "updateConditionalFormatRule": {
    object(UpdateConditionalFormatRuleRequest)
  },
  "deleteConditionalFormatRule": {
    object(DeleteConditionalFormatRuleRequest)
  },
  "sortRange": {
    object(SortRangeRequest)
  },
  "setDataValidation": {
    object(SetDataValidationRequest)
  },
  "setBasicFilter": {
    object(SetBasicFilterRequest)
  },
  "addProtectedRange": {
    object(AddProtectedRangeRequest)
  },
  "updateProtectedRange": {
    object(UpdateProtectedRangeRequest)
  },
  "deleteProtectedRange": {
    object(DeleteProtectedRangeRequest)
  },
  "autoResizeDimensions": {
    object(AutoResizeDimensionsRequest)
  },
  "addChart": {
    object(AddChartRequest)
  },
  "updateChartSpec": {
    object(UpdateChartSpecRequest)
  },
  "updateBanding": {
    object(UpdateBandingRequest)
  },
  "addBanding": {
    object(AddBandingRequest)
  },
  "deleteBanding": {
    object(DeleteBandingRequest)
  },
  "createDeveloperMetadata": {
    object(CreateDeveloperMetadataRequest)
  },
  "updateDeveloperMetadata": {
    object(UpdateDeveloperMetadataRequest)
  },
  "deleteDeveloperMetadata": {
    object(DeleteDeveloperMetadataRequest)
  },
  "randomizeRange": {
    object(RandomizeRangeRequest)
  },
  // End of list of possible types for union field kind.
}
Fields
Union field kind . The kind of update. Exactly one field is required. kind can be only one of the following:
updateSpreadsheetProperties

object( UpdateSpreadsheetPropertiesRequest )

Updates the spreadsheet's properties.

updateSheetProperties

object( UpdateSheetPropertiesRequest )

Updates a sheet's properties.

updateDimensionProperties

object( UpdateDimensionPropertiesRequest )

Updates dimensions' properties.

updateNamedRange

object( UpdateNamedRangeRequest )

Updates a named range.

repeatCell

object( RepeatCellRequest )

Repeats a single cell across a range.

addNamedRange

object( AddNamedRangeRequest )

Adds a named range.

deleteNamedRange

object( DeleteNamedRangeRequest )

Deletes a named range.

addSheet

object( AddSheetRequest )

Adds a sheet.

deleteSheet

object( DeleteSheetRequest )

Deletes a sheet.

autoFill

object( AutoFillRequest )

Automatically fills in more data based on existing data.

cutPaste

object( CutPasteRequest )

Cuts data from one area and pastes it to another.

copyPaste

object( CopyPasteRequest )

Copies data from one area and pastes it to another.

mergeCells

object( MergeCellsRequest )

Merges cells together.

unmergeCells

object( UnmergeCellsRequest )

Unmerges merged cells.

updateBorders

object( UpdateBordersRequest )

Updates the borders in a range of cells.

updateCells

object( UpdateCellsRequest )

Updates many cells at once.

addFilterView

object( AddFilterViewRequest )

Adds a filter view.

appendCells

object( AppendCellsRequest )

Appends cells after the last row with data in a sheet.

clearBasicFilter

object( ClearBasicFilterRequest )

Clears the basic filter on a sheet.

deleteDimension

object( DeleteDimensionRequest )

Deletes rows or columns in a sheet.

deleteEmbeddedObject

object( DeleteEmbeddedObjectRequest )

Deletes an embedded object (e.g, chart, image) in a sheet.

deleteFilterView

object( DeleteFilterViewRequest )

Deletes a filter view from a sheet.

duplicateFilterView

object( DuplicateFilterViewRequest )

Duplicates a filter view.

duplicateSheet

object( DuplicateSheetRequest )

Duplicates a sheet.

findReplace

object( FindReplaceRequest )

Finds and replaces occurrences of some text with other text.

insertDimension

object( InsertDimensionRequest )

Inserts new rows or columns in a sheet.

insertRange

object( InsertRangeRequest )

Inserts new cells in a sheet, shifting the existing cells.

moveDimension

object( MoveDimensionRequest )

Moves rows or columns to another location in a sheet.

updateEmbeddedObjectPosition

object( UpdateEmbeddedObjectPositionRequest )

Updates an embedded object's (e.g. chart, image) position.

pasteData

object( PasteDataRequest )

Pastes data (HTML or delimited) into a sheet.

textToColumns

object( TextToColumnsRequest )

Converts a column of text into many columns of text.

updateFilterView

object( UpdateFilterViewRequest )

Updates the properties of a filter view.

deleteRange

object( DeleteRangeRequest )

Deletes a range of cells from a sheet, shifting the remaining cells.

appendDimension

object( AppendDimensionRequest )

Appends dimensions to the end of a sheet.

addConditionalFormatRule

object( AddConditionalFormatRuleRequest )

Adds a new conditional format rule.

updateConditionalFormatRule

object( UpdateConditionalFormatRuleRequest )

Updates an existing conditional format rule.

deleteConditionalFormatRule

object( DeleteConditionalFormatRuleRequest )

Deletes an existing conditional format rule.

sortRange

object( SortRangeRequest )

Sorts data in a range.

setDataValidation

object( SetDataValidationRequest )

Sets data validation for one or more cells.

setBasicFilter

object( SetBasicFilterRequest )

Sets the basic filter on a sheet.

addProtectedRange

object( AddProtectedRangeRequest )

Adds a protected range.

updateProtectedRange

object( UpdateProtectedRangeRequest )

Updates a protected range.

deleteProtectedRange

object( DeleteProtectedRangeRequest )

Deletes a protected range.

autoResizeDimensions

object( AutoResizeDimensionsRequest )

Automatically resizes one or more dimensions based on the contents of the cells in that dimension.

addChart

object( AddChartRequest )

Adds a chart.

updateChartSpec

object( UpdateChartSpecRequest )

Updates a chart's specifications.

updateBanding

object( UpdateBandingRequest )

Updates a banded range

addBanding

object( AddBandingRequest )

Adds a new banded range

deleteBanding

object( DeleteBandingRequest )

Removes a banded range

createDeveloperMetadata

object( CreateDeveloperMetadataRequest )

Creates new developer metadata

updateDeveloperMetadata

object( UpdateDeveloperMetadataRequest )

Updates an existing developer metadata entry

deleteDeveloperMetadata

object( DeleteDeveloperMetadataRequest )

Deletes developer metadata

randomizeRange

object( RandomizeRangeRequest )

Randomizes the order of the rows in a range.

UpdateSpreadsheetPropertiesRequest

Updates properties of a spreadsheet.

JSON representation
{
  "properties": {
    object(SpreadsheetProperties)
  },
  "fields": string,
}
Fields
properties

object( SpreadsheetProperties )

The properties to update.

fields

string ( FieldMask format)

The fields that should be updated. At least one field must be specified. The root 'properties' is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

UpdateSheetPropertiesRequest

Updates properties of the sheet with the specified sheetId .

JSON representation
{
  "properties": {
    object(SheetProperties)
  },
  "fields": string,
}
Fields
properties

object( SheetProperties )

The properties to update.

fields

string ( FieldMask format)

The fields that should be updated. At least one field must be specified. The root properties is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

UpdateDimensionPropertiesRequest

Updates properties of dimensions within the specified range.

JSON representation
{
  "range": {
    object(DimensionRange)
  },
  "properties": {
    object(DimensionProperties)
  },
  "fields": string,
}
Fields
range

object( DimensionRange )

The rows or columns to update.

properties

object( DimensionProperties )

Properties to update.

fields

string ( FieldMask format)

The fields that should be updated. At least one field must be specified. The root properties is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

UpdateNamedRangeRequest

Updates properties of the named range with the specified namedRangeId .

JSON representation
{
  "namedRange": {
    object(NamedRange)
  },
  "fields": string,
}
Fields
namedRange

object( NamedRange )

The named range to update with the new properties.

fields

string ( FieldMask format)

The fields that should be updated. At least one field must be specified. The root namedRange is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

RepeatCellRequest

Updates all cells in the range to the values in the given Cell object. Only the fields listed in the fields field are updated; others are unchanged.

If writing a cell with a formula, the formula's ranges will automatically increment for each field in the range. For example, if writing a cell with formula =A1 into range B2:C4, B2 would be =A1 , B3 would be =A2 , B4 would be =A3 , C2 would be =B1 , C3 would be =B2 , C4 would be =B3 .

To keep the formula's ranges static, use the $ indicator. For example, use the formula =$A$1 to prevent both the row and the column from incrementing.

JSON representation
{
  "range": {
    object(GridRange)
  },
  "cell": {
    object(CellData)
  },
  "fields": string,
}
Fields
range

object( GridRange )

The range to repeat the cell in.

cell

object( CellData )

The data to write.

fields

string ( FieldMask format)

The fields that should be updated. At least one field must be specified. The root cell is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

AddNamedRangeRequest

Adds a named range to the spreadsheet.

JSON representation
{
  "namedRange": {
    object(NamedRange)
  },
}
Fields
namedRange

object( NamedRange )

The named range to add. The namedRangeId field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of a range that already exists.)

DeleteNamedRangeRequest

Removes the named range with the given ID from the spreadsheet.

JSON representation
{
  "namedRangeId": string,
}
Fields
namedRangeId

string

The ID of the named range to delete.

AddSheetRequest

Adds a new sheet. When a sheet is added at a given index, all subsequent sheets' indexes are incremented. To add an object sheet, use AddChartRequest instead and specify EmbeddedObjectPosition.sheetId or EmbeddedObjectPosition.newSheet .

JSON representation
{
  "properties": {
    object(SheetProperties)
  },
}
Fields
properties

object( SheetProperties )

The properties the new sheet should have. All properties are optional. The sheetId field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of a sheet that already exists.)

DeleteSheetRequest

Deletes the requested sheet.

JSON representation
{
  "sheetId": number,
}
Fields
sheetId

number

The ID of the sheet to delete.

AutoFillRequest

Fills in more data based on existing data.

JSON representation
{
  "useAlternateSeries": boolean,

  // Union field area can be only one of the following:
  "range": {
    object(GridRange)
  },
  "sourceAndDestination": {
    object(SourceAndDestination)
  },
  // End of list of possible types for union field area.
}
Fields
useAlternateSeries

boolean

True if we should generate data with the "alternate" series. This differs based on the type and amount of source data.

Union field area . The area to autofill. area can be only one of the following:
range

object( GridRange )

The range to autofill. This will examine the range and detect the location that has data and automatically fill that data in to the rest of the range.

sourceAndDestination

object( SourceAndDestination )

The source and destination areas to autofill. This explicitly lists the source of the autofill and where to extend that data.

SourceAndDestination

A combination of a source range and how to extend that source.

JSON representation
{
  "source": {
    object(GridRange)
  },
  "dimension": enum(Dimension),
  "fillLength": number,
}
Fields
source

object( GridRange )

The location of the data to use as the source of the autofill.

dimension

enum( Dimension )

The dimension that data should be filled into.

fillLength

number

The number of rows or columns that data should be filled into. Positive numbers expand beyond the last row or last column of the source. Negative numbers expand before the first row or first column of the source.

CutPasteRequest

Moves data from the source to the destination.

JSON representation
{
  "source": {
    object(GridRange)
  },
  "destination": {
    object(GridCoordinate)
  },
  "pasteType": enum(PasteType),
}
Fields
source

object( GridRange )

The source data to cut.

destination

object( GridCoordinate )

The top-left coordinate where the data should be pasted.

pasteType

enum( PasteType )

What kind of data to paste. All the source data will be cut, regardless of what is pasted.

PasteType

What kind of data should be pasted.

Enums
PASTE_NORMAL Paste values, formulas, formats, and merges.
PASTE_VALUES Paste the values ONLY without formats, formulas, or merges.
PASTE_FORMAT Paste the format and data validation only.
PASTE_NO_BORDERS Like PASTE_NORMAL but without borders.
PASTE_FORMULA Paste the formulas only.
PASTE_DATA_VALIDATION Paste the data validation only.
PASTE_CONDITIONAL_FORMATTING Paste the conditional formatting rules only.

CopyPasteRequest

Copies data from the source to the destination.

JSON representation
{
  "source": {
    object(GridRange)
  },
  "destination": {
    object(GridRange)
  },
  "pasteType": enum(PasteType),
  "pasteOrientation": enum(PasteOrientation),
}
Fields
source

object( GridRange )

The source range to copy.

destination

object( GridRange )

The location to paste to. If the range covers a span that's a multiple of the source's height or width, then the data will be repeated to fill in the destination range. If the range is smaller than the source range, the entire source data will still be copied (beyond the end of the destination range).

pasteType

enum( PasteType )

What kind of data to paste.

pasteOrientation

enum( PasteOrientation )

How that data should be oriented when pasting.

PasteOrientation

How a paste operation should be performed.

Enums
NORMAL Paste normally.
TRANSPOSE Paste transposed, where all rows become columns and vice versa.

MergeCellsRequest

Merges all cells in the range.

JSON representation
{
  "range": {
    object(GridRange)
  },
  "mergeType": enum(MergeType),
}
Fields
range

object( GridRange )

The range of cells to merge.

mergeType

enum( MergeType )

How the cells should be merged.

MergeType

The type of merge to create.

Enums
MERGE_ALL Create a single merge from the range
MERGE_COLUMNS Create a merge for each column in the range
MERGE_ROWS Create a merge for each row in the range

UnmergeCellsRequest

Unmerges cells in the given range.

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

object( GridRange )

The range within which all cells should be unmerged. If the range spans multiple merges, all will be unmerged. The range must not partially span any merge.

UpdateBordersRequest

Updates the borders of a range. If a field is not set in the request, that means the border remains as-is. For example, with two subsequent UpdateBordersRequest:

  1. range: A1:A5 { top: RED, bottom: WHITE }
  2. range: A1:A5 { left: BLUE }

That would result in A1:A5 having a borders of { top: RED, bottom: WHITE, left: BLUE } . If you want to clear a border, explicitly set the style to NONE .

JSON representation
{
  "range": {
    object(GridRange)
  },
  "top": {
    object(Border)
  },
  "bottom": {
    object(Border)
  },
  "left": {
    object(Border)
  },
  "right": {
    object(Border)
  },
  "innerHorizontal": {
    object(Border)
  },
  "innerVertical": {
    object(Border)
  },
}
Fields
range

object( GridRange )

The range whose borders should be updated.

top

object( Border )

The border to put at the top of the range.

bottom

object( Border )

The border to put at the bottom of the range.

left

object( Border )

The border to put at the left of the range.

right

object( Border )

The border to put at the right of the range.

innerHorizontal

object( Border )

The horizontal border to put within the range.

innerVertical

object( Border )

The vertical border to put within the range.

UpdateCellsRequest

Updates all cells in a range with new data.

JSON representation
{
  "rows": [
    {
      object(RowData)
    }
  ],
  "fields": string,

  // Union field area can be only one of the following:
  "start": {
    object(GridCoordinate)
  },
  "range": {
    object(GridRange)
  },
  // End of list of possible types for union field area.
}
Fields
rows[]

object( RowData )

The data to write.

fields

string ( FieldMask format)

The fields of CellData that should be updated. At least one field must be specified. The root is the CellData; 'row.values.' should not be specified. A single "*" can be used as short-hand for listing every field.

Union field area . The location data should be written. Exactly one value must be set. area can be only one of the following:
start

object( GridCoordinate )

The coordinate to start writing data at. Any number of rows and columns (including a different number of columns per row) may be written.

range

object( GridRange )

The range to write data to.

If the data in rows does not cover the entire requested range, the fields matching those set in fields will be cleared.

AddFilterViewRequest

Adds a filter view.

JSON representation
{
  "filter": {
    object(FilterView)
  },
}
Fields
filter

object( FilterView )

The filter to add. The filterViewId field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of a filter that already exists.)

AppendCellsRequest

Adds new cells after the last row with data in a sheet, inserting new rows into the sheet if necessary.

JSON representation
{
  "sheetId": number,
  "rows": [
    {
      object(RowData)
    }
  ],
  "fields": string,
}
Fields
sheetId

number

The sheet ID to append the data to.

rows[]

object( RowData )

The data to append.

fields

string ( FieldMask format)

The fields of CellData that should be updated. At least one field must be specified. The root is the CellData; 'row.values.' should not be specified. A single "*" can be used as short-hand for listing every field.

ClearBasicFilterRequest

Clears the basic filter, if any exists on the sheet.

JSON representation
{
  "sheetId": number,
}
Fields
sheetId

number

The sheet ID on which the basic filter should be cleared.

DeleteDimensionRequest

Deletes the dimensions from the sheet.

JSON representation
{
  "range": {
    object(DimensionRange)
  },
}
Fields
range

object( DimensionRange )

The dimensions to delete from the sheet.

DeleteEmbeddedObjectRequest

Deletes the embedded object with the given ID.

JSON representation
{
  "objectId": number,
}
Fields
objectId

number

The ID of the embedded object to delete.

DeleteFilterViewRequest

Deletes a particular filter view.

JSON representation
{
  "filterId": number,
}
Fields
filterId

number

The ID of the filter to delete.

DuplicateFilterViewRequest

Duplicates a particular filter view.

JSON representation
{
  "filterId": number,
}
Fields
filterId

number

The ID of the filter being duplicated.

DuplicateSheetRequest

Duplicates the contents of a sheet.

JSON representation
{
  "sourceSheetId": number,
  "insertSheetIndex": number,
  "newSheetId": number,
  "newSheetName": string,
}
Fields
sourceSheetId

number

The sheet to duplicate.

insertSheetIndex

number

The zero-based index where the new sheet should be inserted. The index of all sheets after this are incremented.

newSheetId

number

If set, the ID of the new sheet. If not set, an ID is chosen. If set, the ID must not conflict with any existing sheet ID. If set, it must be non-negative.

newSheetName

string

The name of the new sheet. If empty, a new name is chosen for you.

FindReplaceRequest

Finds and replaces data in cells over a range, sheet, or all sheets.

JSON representation
{
  "find": string,
  "replacement": string,
  "matchCase": boolean,
  "matchEntireCell": boolean,
  "searchByRegex": boolean,
  "includeFormulas": boolean,

  // Union field scope can be only one of the following:
  "range": {
    object(GridRange)
  },
  "sheetId": number,
  "allSheets": boolean,
  // End of list of possible types for union field scope.
}
Fields
find

string

The value to search.

replacement

string

The value to use as the replacement.

matchCase

boolean

True if the search is case sensitive.

matchEntireCell

boolean

True if the find value should match the entire cell.

searchByRegex

boolean

True if the find value is a regex. The regular expression and replacement should follow Java regex rules at https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html . The replacement string is allowed to refer to capturing groups. For example, if one cell has the contents "Google Sheets" and another has "Google Docs" , then searching for "o.* (.*)" with a replacement of "$1 Rocks" would change the contents of the cells to "GSheets Rocks" and "GDocs Rocks" respectively.

includeFormulas

boolean

True if the search should include cells with formulas. False to skip cells with formulas.

Union field scope . The scope over which to find/replace -- one and only one must be set. scope can be only one of the following:
range

object( GridRange )

The range to find/replace over.

sheetId

number

The sheet to find/replace over.

allSheets

boolean

True to find/replace over all sheets.

InsertDimensionRequest

Inserts rows or columns in a sheet at a particular index.

JSON representation
{
  "range": {
    object(DimensionRange)
  },
  "inheritFromBefore": boolean,
}
Fields
range

object( DimensionRange )

The dimensions to insert. Both the start and end indexes must be bounded.

inheritFromBefore

boolean

Whether dimension properties should be extended from the dimensions before or after the newly inserted dimensions. True to inherit from the dimensions before (in which case the start index must be greater than 0), and false to inherit from the dimensions after.

For example, if row index 0 has red background and row index 1 has a green background, then inserting 2 rows at index 1 can inherit either the green or red background. If inheritFromBefore is true, the two new rows will be red (because the row before the insertion point was red), whereas if inheritFromBefore is false, the two new rows will be green (because the row after the insertion point was green).

InsertRangeRequest

Inserts cells into a range, shifting the existing cells over or down.

JSON representation
{
  "range": {
    object(GridRange)
  },
  "shiftDimension": enum(Dimension),
}
Fields
range

object( GridRange )

The range to insert new cells into.

shiftDimension

enum( Dimension )

The dimension which will be shifted when inserting cells. If ROWS , existing cells will be shifted down. If COLUMNS , existing cells will be shifted right.

MoveDimensionRequest

Moves one or more rows or columns.

JSON representation
{
  "source": {
    object(DimensionRange)
  },
  "destinationIndex": number,
}
Fields
source

object( DimensionRange )

The source dimensions to move.

destinationIndex

number

The zero-based start index of where to move the source data to, based on the coordinates before the source data is removed from the grid. Existing data will be shifted down or right (depending on the dimension) to make room for the moved dimensions. The source dimensions are removed from the grid, so the the data may end up in a different index than specified.

For example, given A1..A5 of 0, 1, 2, 3, 4 and wanting to move "1" and "2" to between "3" and "4" , the source would be ROWS [1..3) ,and the destination index would be "4" (the zero-based index of row 5). The end result would be A1..A5 of 0, 3, 1, 2, 4 .

UpdateEmbeddedObjectPositionRequest

Update an embedded object's position (such as a moving or resizing a chart or image).

JSON representation
{
  "objectId": number,
  "newPosition": {
    object(EmbeddedObjectPosition)
  },
  "fields": string,
}
Fields
objectId

number

The ID of the object to moved.

newPosition

object( EmbeddedObjectPosition )

An explicit position to move the embedded object to. If newPosition.sheetId is set, a new sheet with that ID will be created. If newPosition.newSheet is set to true, a new sheet will be created with an ID that will be chosen for you.

fields

string ( FieldMask format)

The fields of OverlayPosition that should be updated when setting a new position. Used only if newPosition.overlayPosition is set, in which case at least one field must be specified. The root newPosition.overlayPosition is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

PasteDataRequest

Inserts data into the spreadsheet starting at the specified coordinate.

JSON representation
{
  "coordinate": {
    object(GridCoordinate)
  },
  "data": string,
  "type": enum(PasteType),

  // Union field kind can be only one of the following:
  "delimiter": string,
  "html": boolean,
  // End of list of possible types for union field kind.
}
Fields
coordinate

object( GridCoordinate )

The coordinate at which the data should start being inserted.

data

string

The data to insert.

type

enum( PasteType )

How the data should be pasted.

Union field kind . How to interpret the data, exactly one value must be set. kind can be only one of the following:
delimiter

string

The delimiter in the data.

html

boolean

True if the data is HTML.

TextToColumnsRequest

Splits a column of text into multiple columns, based on a delimiter in each cell.

JSON representation
{
  "source": {
    object(GridRange)
  },
  "delimiter": string,
  "delimiterType": enum(DelimiterType),
}
Fields
source

object( GridRange )

The source data range. This must span exactly one column.

delimiter

string

The delimiter to use. Used only if delimiterType is CUSTOM .

delimiterType

enum( DelimiterType )

The delimiter type to use.

DelimiterType

The delimiter to split on.

Enums
DELIMITER_TYPE_UNSPECIFIED Default value. This value must not be used.
COMMA ","
SEMICOLON ";"
PERIOD "."
SPACE " "
CUSTOM A custom value as defined in delimiter.

UpdateFilterViewRequest

Updates properties of the filter view.

JSON representation
{
  "filter": {
    object(FilterView)
  },
  "fields": string,
}
Fields
filter

object( FilterView )

The new properties of the filter view.

fields

string ( FieldMask format)

The fields that should be updated. At least one field must be specified. The root filter is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

DeleteRangeRequest

Deletes a range of cells, shifting other cells into the deleted area.

JSON representation
{
  "range": {
    object(GridRange)
  },
  "shiftDimension": enum(Dimension),
}
Fields
range

object( GridRange )

The range of cells to delete.

shiftDimension

enum( Dimension )

The dimension from which deleted cells will be replaced with. If ROWS , existing cells will be shifted upward to replace the deleted cells. If COLUMNS , existing cells will be shifted left to replace the deleted cells.

AppendDimensionRequest

Appends rows or columns to the end of a sheet.

JSON representation
{
  "sheetId": number,
  "dimension": enum(Dimension),
  "length": number,
}
Fields
sheetId

number

The sheet to append rows or columns to.

dimension

enum( Dimension )

Whether rows or columns should be appended.

length

number

The number of rows or columns to append.

AddConditionalFormatRuleRequest

Adds a new conditional format rule at the given index. All subsequent rules' indexes are incremented.

JSON representation
{
  "rule": {
    object(ConditionalFormatRule)
  },
  "index": number,
}
Fields
rule

object( ConditionalFormatRule )

The rule to add.

index

number

The zero-based index where the rule should be inserted.

UpdateConditionalFormatRuleRequest

Updates a conditional format rule at the given index, or moves a conditional format rule to another index.

JSON representation
{
  "index": number,
  "sheetId": number,

  // Union field instruction can be only one of the following:
  "rule": {
    object(ConditionalFormatRule)
  },
  "newIndex": number,
  // End of list of possible types for union field instruction.
}
Fields
index

number

The zero-based index of the rule that should be replaced or moved.

sheetId

number

The sheet of the rule to move. Required if newIndex is set, unused otherwise.

Union field instruction . The kind of update that should happen. instruction can be only one of the following:
rule

object( ConditionalFormatRule )

The rule that should replace the rule at the given index.

newIndex

number

The zero-based new index the rule should end up at.

DeleteConditionalFormatRuleRequest

Deletes a conditional format rule at the given index. All subsequent rules' indexes are decremented.

JSON representation
{
  "index": number,
  "sheetId": number,
}
Fields
index

number

The zero-based index of the rule to be deleted.

sheetId

number

The sheet the rule is being deleted from.

SortRangeRequest

Sorts data in rows based on a sort order per column.

JSON representation
{
  "range": {
    object(GridRange)
  },
  "sortSpecs": [
    {
      object(SortSpec)
    }
  ],
}
Fields
range

object( GridRange )

The range to sort.

sortSpecs[]

object( SortSpec )

The sort order per column. Later specifications are used when values are equal in the earlier specifications.

SetDataValidationRequest

Sets a data validation rule to every cell in the range. To clear validation in a range, call this with no rule specified.

JSON representation
{
  "range": {
    object(GridRange)
  },
  "rule": {
    object(DataValidationRule)
  },
}
Fields
range

object( GridRange )

The range the data validation rule should apply to.

rule

object( DataValidationRule )

The data validation rule to set on each cell in the range, or empty to clear the data validation in the range.

SetBasicFilterRequest

Sets the basic filter associated with a sheet.

JSON representation
{
  "filter": {
    object(BasicFilter)
  },
}
Fields
filter

object( BasicFilter )

The filter to set.

AddProtectedRangeRequest

Adds a new protected range.

JSON representation
{
  "protectedRange": {
    object(ProtectedRange)
  },
}
Fields
protectedRange

object( ProtectedRange )

The protected range to be added. The protectedRangeId field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of a range that already exists.)

UpdateProtectedRangeRequest

Updates an existing protected range with the specified protectedRangeId .

JSON representation
{
  "protectedRange": {
    object(ProtectedRange)
  },
  "fields": string,
}
Fields
protectedRange

object( ProtectedRange )

The protected range to update with the new properties.

fields

string ( FieldMask format)

The fields that should be updated. At least one field must be specified. The root protectedRange is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

DeleteProtectedRangeRequest

Deletes the protected range with the given ID.

JSON representation
{
  "protectedRangeId": number,
}
Fields
protectedRangeId

number

The ID of the protected range to delete.

AutoResizeDimensionsRequest

Automatically resizes one or more dimensions based on the contents of the cells in that dimension.

JSON representation
{
  "dimensions": {
    object(DimensionRange)
  },
}
Fields
dimensions

object( DimensionRange )

The dimensions to automatically resize.

AddChartRequest

Adds a chart to a sheet in the spreadsheet.

JSON representation
{
  "chart": {
    object(EmbeddedChart)
  },
}
Fields
chart

object( EmbeddedChart )

The chart that should be added to the spreadsheet, including the position where it should be placed. The chartId field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of a chart that already exists.)

UpdateChartSpecRequest

Updates a chart's specifications. (This does not move or resize a chart. To move or resize a chart, use UpdateEmbeddedObjectPositionRequest .)

JSON representation
{
  "chartId": number,
  "spec": {
    object(ChartSpec)
  },
}
Fields
chartId

number

The ID of the chart to update.

spec

object( ChartSpec )

The specification to apply to the chart.

UpdateBandingRequest

Updates properties of the supplied banded range.

JSON representation
{
  "bandedRange": {
    object(BandedRange)
  },
  "fields": string,
}
Fields
bandedRange

object( BandedRange )

The banded range to update with the new properties.

fields

string ( FieldMask format)

The fields that should be updated. At least one field must be specified. The root bandedRange is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

AddBandingRequest

Adds a new banded range to the spreadsheet.

JSON representation
{
  "bandedRange": {
    object(BandedRange)
  },
}
Fields
bandedRange

object( BandedRange )

The banded range to add. The bandedRangeId field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of a range that already exists.)

DeleteBandingRequest

Removes the banded range with the given ID from the spreadsheet.

JSON representation
{
  "bandedRangeId": number,
}
Fields
bandedRangeId

number

The ID of the banded range to delete.

CreateDeveloperMetadataRequest

A request to create developer metadata.

JSON representation
{
  "developerMetadata": {
    object(DeveloperMetadata)
  },
}
Fields
developerMetadata

object( DeveloperMetadata )

The developer metadata to create.

UpdateDeveloperMetadataRequest

A request to update properties of developer metadata. Updates the properties of the developer metadata selected by the filters to the values provided in the DeveloperMetadata resource. Callers must specify the properties they wish to update in the fields parameter, as well as specify at least one DataFilter matching the metadata they wish to update.

JSON representation
{
  "dataFilters": [
    {
      object(DataFilter)
    }
  ],
  "developerMetadata": {
    object(DeveloperMetadata)
  },
  "fields": string,
}
Fields
dataFilters[]

object( DataFilter )

The filters matching the developer metadata entries to update.

developerMetadata

object( DeveloperMetadata )

The value that all metadata matched by the data filters will be updated to.

fields

string ( FieldMask format)

The fields that should be updated. At least one field must be specified. The root developerMetadata is implied and should not be specified. A single "*" can be used as short-hand for listing every field.

DeleteDeveloperMetadataRequest

A request to delete developer metadata.

JSON representation
{
  "dataFilter": {
    object(DataFilter)
  },
}
Fields
dataFilter

object( DataFilter )

The data filter describing the criteria used to select which developer metadata entry to delete.

RandomizeRangeRequest

Randomizes the order of the rows in a range.

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

object( GridRange )

The range to randomize.

Send feedback about...