Delete multiple columns

Here is a tip how to delete multiple columns.

 

Source code

function deleteCols() {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sh = ss.getActiveSheet();

  sh.deleteColumns(4, 3);
}

  

Format

SheetObject.deleteColumns(columnPosition, howMany)

  

Parameters

columnPosition … The target column’s number.

howMany … This is the number of columns to be deleted.

  

Responses

None

Leave a Comment