0
votes

Can I query my spreadsheet tabs via tab index instead of the tab title or tab id?

https://sheets.googleapis.com/v4/spreadsheets/{my sheet id}/values/'Hero Video Copy Section'?key={secret code}

'Hero Video Copy Section' is the title of the tab, but I want to find the tab via index.

1

1 Answers

0
votes

You may refer with this SO thread(quite old question). Given example is if the row number is in A1, and the column number is in A2:

=OFFSET(A1;A1-1;A2-1)
=INDIRECT("R"&A1&"C"&A2)
=INDEX(A1:400000;A1;A2)

Also, you can check this documentation about Google Apps Script which uses an array to log the name of the second sheet.

 // The code below will log the name of the second sheet
 var sheets = SpreadsheetApp.getActiveSpreadsheet().getSheets();
 if (sheets.length > 1) {
   Logger.log(sheets[1].getName());
 }