Skip to main content
deleteRows removes rows and shifts following rows upward. It groups adjacent targets and deletes from bottom to top so row shifting cannot change later targets.

Example

Inputs

spreadsheet, source, and one row number or an array of up to 1,000 are required. Duplicates are removed and numbers are sorted. Every row must belong to the source body. account optionally selects the Google account binding.

Output

Returns { affectedCells, rowNumbers }, where row numbers are the original one-based targets. Stored row numbers below a deletion can become stale because the sheet shifts upward.