Skip to content
Julian Halliwell edited this page Dec 11, 2021 · 5 revisions

Deletes the data from multiple rows, but not the rows themselves.

deleteRows( workbook, range )

Required arguments

  • workbook spreadsheet object
  • range string: a comma-delimited list of ranges. Each value can be either a single number, a range of numbers with a hyphen, e.g. "1,2-5", or an open-ended range, e.g. "2-" (meaning all starting from 2).

Chainable? Yes.

Example

data = QueryNew( "First,Last","VarChar,VarChar",[ [ "Susi","Sorglos" ],[ "Frumpo","McNugget" ] ] );
spreadsheet = New spreadsheet();
workbook = spreadsheet.workbookFromQuery( data );
spreadsheet.deleteRows( workbook,"1-2" );
Clone this wiki locally