Edit row height

Here is a tip how to edit row height.

 

Source code

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

  // (a) Edit a row's width
  sh.setRowHeight(3, 30);

  // (b) Edit rows' width
  sh.setRowHeights(5, 2, 90);
}

 

Format

(a) SheetObject.setRowHeight(rowPosition, height);

(b) SheetObject.setRowHeights(startRow, numRows, height);

 

Parameters

(a) “setRowHeight”

rowPosition … Target row number.

height … New height value you like

(b) “setRowHeights”

startRow … 1st row number to be edited.

numRows … The number of rows to be edited.

height … New height value you like.

 

Responses

None

Leave a Comment