prependRows
Room is made first and the values are written into it, so nothing already on the sheet is overwritten. Given a sheet the rows go to its top; given a range they go above the range's first row and the values are written on its columns.
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 insert into, or the range to insert at. |
|
| 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
Inserting at the top of a sheet
Inserting at a range
See also
Source
This documentation was generated with AI (Claude) from the library's source code.