javascript get last row googlesheets

Solutions on MaxInterview for javascript get last row googlesheets by the best coders in the world

showing results for - "javascript get last row googlesheets"
Isabella
30 May 2020
1//****GLOBALS****
2var SpreadsheetID = "1A7Ix7rzrhu7zBKcS7zPeU8w8c_nTae0mBHycvMUE68A";
3var SheetName = "CleanData";
4 
5function myFunction() {
6  var ss = SpreadsheetApp.openById(SpreadsheetID)
7  var sheet = ss.getSheetByName(SheetName);
8  Logger.log(sheet.getLastRow() + " Is the last Column.");
9  
10  var range = sheet.getDataRange();
11  Logger.log(range.getLastRow() + " Is the last Column.");
12  
13  //Range Values
14  var data = range.getValues();
15  Logger.log(data);
16}
17