range.getvalues 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: cell get row google script
var cell = sheet1.getActiveCell();
var SelectRow = cell.getRow();