I am trying to count the maximum number of rows in other google sheets. Actually, Each spreadsheet has a number of tabs and I want the maximum row number of all tabs under each spreadsheet.
I find that IMPORTRANGE function can get the data from other spreadsheet with URL, however, this function can only read the data with sheet name. To get the sheet name list, I think the function below might be useful:
function sheetnames() {
var out = new Array()
var sheets = SpreadsheetApp.getActiveSpreadsheet().getSheets();
return out
}
But this function only works in the sheet it is in and to write this function in every single sheet is obviously impossible, so here is my question:
Is it possible to improve the sheetnames()function to get the sheet names from other sheets? (with URL? I'm not sure) Or How can I realize it with other methods?
Thanks a lot for your patience!