Skip to main content

$integration.googleSheets.deleteRowOrColumn

The method is used to delete data in lines or columns from a Google spreadsheet.

Syntax

The method accepts 4 required arguments.

ArgumentDescriptionType
integrationIdIntegration identifierString
spreadsheetIdGoogle spreadsheet identifierString
sheetNameThe name of the necessary sheetString
valuesThe lines or the columns to be deletedArray of strings

An example of calling the method:

$integration.googleSheets.deleteRowOrColumn(
"5a9f649c-bdc4-4805-92c4-7bed80f7c285",
"1OysnSRFIBTWgVWEX1wYndSLgSZ3umznXR96v0vTh8Hg",
"Sheet2",
["H:H", "5:6"]
);

Action

The method deletes lines, columns, or a range of lines or columns in the necessary sheet.

tip
When deleting a line from a spreadsheet, other lines move up. When deleting a column, other columns shift left.

Specify a range of lines or columns you want to delete as follows:

  • To delete a line, specify a range as n:n where n is a number of the line to be deleted. For example, if you want to delete the first line, write 1:1.
  • To delete a column, specify a range as A:A where A is a letter for the column to be deleted.
  • To delete multiple contiguous lines, specify a range as n:m where n is the first line and m is the last line to be deleted. For example, if you want to delete the lines from the first to the third one, write 1:3.
  • To delete multiple contiguous columns, specify a range as A:C where A is the first column and C is the last column to be deleted.

The method also allows deleting multiple lines and columns that are not contiguous.

Example

In the video below, we delete a client from the spreadsheet.