prependColumns
Room is made first and the values are written into it, so nothing already on the sheet is overwritten. Given a sheet the columns go to its start; given a range they go before the range's first column and the values are written on its rows.
The matrix is indexed by row and then by column, and it has to be exactly count columns wide. Passing no values inserts empty 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. |
|
| How many columns to insert. |
|
| A matrix indexed by row then column, exactly |
|
|
|
Returns
GoogleAppsScript.Spreadsheet.Sheet — the sheet, so calls can be chained.
Throws
Exception | Condition |
|---|---|
|
|
| the first argument is neither a sheet nor a range. |
Examples
Inserting at the start of a sheet
Inserting at a range
See also
Source
This documentation was generated with AI (Claude) from the library's source code.