getdatarange google sheets code example
Example 1: getranges google script
let SS = APP.getActiveSpreadsheet();
let sheetIndex0 = SS.getSheets()[0];
sheetIndex0.getRangeList(['A1', 'B1:C7']).setHorizontalAlignment("center");
Example 2: google apps scipt getRange
getRange(row, column, numRows, numColumns)
Example 3: .setRowHeights google script
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
// Sets the first three rows to a height of 20 pixels
sheet.setRowHeights(1, 3, 20);