appendRows
Pass a sheet and the whole sheet is examined, with the write starting in column 1; pass a range and only its cells are, with the write landing on the range's columns — data elsewhere on the sheet no longer decides where the block goes.
Nothing is overwritten: the write starts one row below the last one holding data, and 0 and false count as data. The sheet gains rows when it is too short for the result. Unlike Sheet#appendRow, which takes one row at a time, the whole block is written in a single call.
A cell whose text starts with = is written as a formula, not as text — the same rule the editor follows.
A failure inside the write — the service unavailable, the sheet gone — comes back as the error the service raised, with its stack. The document lock is released either way.
Parameters
Parameter | Type | Description |
|---|---|---|
|
| The sheet to append to, or the range to append within. |
|
| A matrix of rows: one array per row, all of the same length. |
|
|
|
Returns
GoogleAppsScript.Spreadsheet.Sheet — the sheet, so calls can be chained.
Throws
Exception | Condition |
|---|---|
| no argument is passed. |
| the first argument is neither a sheet nor a range. |
| the values are not a matrix with rows of equal length. |
Examples
Appending to a sheet
Appending within a range
See also
Source
This documentation was generated with AI (Claude) from the library's source code.