prependRow
prependRows with a single row: room is made first, so nothing already there is overwritten. A sheet gets the row at its top; a range gets it immediately above its first row, with the values written on the range's columns.
A cell whose text starts with = is written as a formula, not as text — the same rule the editor follows.
Parameters
Parameter | Type | Description |
|---|---|---|
|
| The sheet to insert into, or the range to insert at. |
|
| A single row: a flat array, one value per column. |
|
|
|
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 flat array. |
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.