“Script Google Apps Dapatkan baris terakhir” Kode Jawaban

Script Google Apps Dapatkan baris terakhir

// This example assumes there is a sheet named "first"
let ss = SpreadsheetApp.getActiveSpreadsheet();
let first = ss.getSheetByName("first");

// "first" sheet has a total row count of 10
// data exists only up to row 5
// rows 6 to 10 are blank rows

// getMaxRows() 
// Returns the current number of rows in the sheet, regardless of content.
console.log(first.getMaxRows()); // 10

// getLastRow() 
// Returns the position of the last row that has content.
console.log(first.getLastRow()); // 5
Web Surfer

Dapatkan skrip Google baris terakhir

//To get last row of the sheet.
var LastRowOfSheet = SpreadsheetApp.getActive().getActiveSheet().getRange('a:a').getLastRow();

//To get last row with value in it.
var LastRow_WithValue = SpreadsheetApp.getActive().getActiveSheet().getLastRow();
Graceful Gerbil

Jawaban yang mirip dengan “Script Google Apps Dapatkan baris terakhir”

Pertanyaan yang mirip dengan “Script Google Apps Dapatkan baris terakhir”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya