Skip to main content

Overview

Use sheet.getRows() to query rows from any sheet with filtering and sorting.
GetRowsQuery
required
Object with where (filters) and orderBy (sorting) arrays
number
Maximum rows to return

Filtering with where

The where array contains filter conditions. Use cell filters for column values or row filters for metadata.
Filter by column values:
Operators:

Sorting with orderBy

The orderBy array specifies sort order. Multiple sorts are applied in sequence.
Sort by column values:

Examples