Gets a range of cells in the specified sheet area.
Parameters
- row
- The row index.
- col
- The column index.
- rowCount
- The row count of the range. If you do not provide this parameter, it defaults to 1.
- colCount
- The column count of the range. If you do not provide this parameter, it defaults to 1.
- sheetArea
- The sheet area. If this parameter is not given, it defaults to viewport.
Return Value
The cellRange. If row is -1 and rowCount is -1, the range represents columns. For example, sheet.getRange(-1,4,-1,6) returns the columns "E:J". If col is -1 and colCount is -1, the range represents rows. For example, sheet.getRange(4,-1,6,-1) returns the rows "5:10".