Skip to main content
insertRows shifts existing rows down and writes new records atomically.

Example

Inputs

spreadsheet, source, one-based rowNumber, and one or more header-keyed rows are required. Record and inputMode behavior match Append rows. The position must be in the source body or immediately after its current end. account optionally selects the Google account binding.

Output

Returns { affectedCells, rowNumbers, updatedRange }. rowNumbers contains the consecutive new rows. Formatting is inherited from the previous body row when inserting below the first body row.