GOOGLE WORKSPACE Sort range function

The GOOGLE WORKSPACE Sort range function in RPA.

Help CentreFunctions & Formulas

This article describes the RPA Google Workspace connector function to sort a range in a Google Sheet.

For a full list of available functions, please read GOOGLE WORKSPACE functions.


Description

The Sort range function sorts the data in a specified range by one or more columns. The sort modifies the data in place.


Input parameters

ParameterRequiredTypeDefaultDescription
ConnectorYesSelect-Select the Google Workspace connector to use
Spreadsheet IDYesText-Google Sheets spreadsheet ID
Sheet IDYesText-Numeric sheet ID
RangeYesText-A1 notation range to sort (e.g. A1:D100)
Sort specsYesText-JSON array of sort specs, e.g. [{"dimensionIndex":0,"sortOrder":"ASCENDING"}]

Errors

  • Sheet not found – no sheet exists with the given ID
  • Invalid sort spec – the sort specification JSON is malformed

Tips

  • dimensionIndex is zero-based (0 = column A, 1 = column B, etc.)
  • sortOrder can be ASCENDING or DESCENDING
  • Exclude header rows from the range to avoid sorting them

Related functions

  • Read sheet range – Read values after sorting
  • Find in sheet – Search for values

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.