get last row google scripts code example
Example 1: apps script get last row with data
var cur_ss = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var data = cur_ss.getDataRange().getValues();
var Avals = cur_ss.getRange("B9:B").getValues();
var Alast = Avals.filter(String).length;
return (Alast + 9);
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);