.get range in google script code example
Example 1: google script get sheet size
var lastColumn = sheet.getLastColumn();
// Returns the position of the last column that has content.
Example 2: .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);