get last ro google scripts code example
Example 1: .setColumnWidths() google script
let SS = SpreadsheetApp.getActiveSpreadsheet();
SS.getActiveSheet().setColumnWidths(1, 3, 180)
//.setColumnWidths(beginColumn, amountOfColumnsToChangeFromBeginColumn, width)
Example 2: 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);