prependColumn
prependColumns with a single column: room is made first, so nothing already there is overwritten. A sheet gets the column at its start; a range gets it immediately before its first column, with the values written on the range's rows.
The values go in as a flat array of cells, top to bottom. Omit them and an empty column is inserted.
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. |
|
| The cells of the single column, top to bottom. Omit for an empty column. |
|
|
|
Returns
GoogleAppsScript.Spreadsheet.Sheet — the sheet, so calls can be chained.
Throws
Exception | Condition |
|---|---|
| the values are given but are not a non-empty flat array. |
| 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.