# Delete Rows

> `UiPath.Gsuite.Activities.DeleteRowConnections`

`UiPath.Gsuite.Activities.DeleteRowConnections`

## Description

Delete one or several rows from a specified position in a spreadsheet range. When you delete a row, the cells below are shifted up.

### Scopes

This activity requires the following scopes:

* https://www.googleapis.com/auth/drive.file

OR

* https://www.googleapis.com/auth/drive

OR

* https://www.googleapis.com/auth/spreadsheets

## Project compatibility

Windows | Cross-platform

## Configuration

* **Google Sheets connection** - The connection for the Google Workspace account to use in the activity.
* **Spreadsheet** - The target spreadsheet to delete rows from. Select the **Folder**![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-300958-818994f9.webp) icon to browse Google Drive folders and select a spreadsheet. This option accepts input as `IResource`. Use the See more button menu to switch to **Use variable** or **Url or ID** input (`String`) modes.
  + **Spreadsheet sample** - Select a file with the same ranges as the variable file. The field is visible after clicking **Use spreadsheet template**. Browse the Google Drive folders and select a spreadsheet. In Studio Desktop, the option is available from the **Plus** button menu next to **Range**. This field accepts `IResource` input. To learn more, see [Working with templates](https://docs.uipath.com/activities/other/latest/productivity/working-with-templates).
  + **Spreadsheet URL** - The URL or ID of the spreadsheet of interest. This field is available when **Url or ID** is selected as the input mode. This property supports `String` variables and string formatted values. For details, see [How to retrieve spreadsheet IDs](https://docs.uipath.com/activities/other/latest/productivity/google-workspace-retrieve-spreadsheet-ids).
  + Select the **Reload File Data** option if you've modified your folders and need to retrieve the latest data.

* **Range** - Select a range or enter a custom one (a full custom range can be used, i.e., `Sheet1!A1:C10`). This field is prepopulated with information retrieved from the selected spreadsheet. This property supports `String` variables and string formatted values.
  + Select the **Update Ranges** option if you've modified your sheets and need to retrieve the latest data.

* **Rows** - Specify the row indices to delete, or their range, separated by commas, e.g., 0, 2, 5-7. This property supports `String` variables and string formatted values.
* **Delete behavior** - Indicates the delete mode.
  + **Clear** - Clear the selected rows.
  + **Delete** - Delete entire sheet rows of the selection.

**Output**

* **Range information** - The updated range information, after the row is deleted, stored in a `RangeInformation` variable. Automatically generated output variable. You can use it as it is or save it with a different name.

## Example

![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-325914-c259354a.webp)

See also:

* [Sheets activities](https://docs.uipath.com/activities/other/latest/productivity/sheets-activities)
* [Delete Range](https://docs.uipath.com/activities/other/latest/productivity/google-workspace-sheets-delete-range-connections)
* [Write Cell](https://docs.uipath.com/activities/other/latest/productivity/google-workspace-sheets-write-cell-connections)
