I am looking to create a master sheet within a Google Sheets document which pulls a row of data (C33:AC33) from each tab (while excluding the following tabs: Menu, Template, Class List). I need to use a script because the tabs will constantly change and be added to.
I need the new data to be displayed from the 5th row, 2nd column on the master sheet. In the 1st column, I wanted to display the name of the tab the data came from.
Is this possible? I've been looking for hours and this is the closest snippet of code I've found which I think could possibly do what I need however I am a script newbie and don't know if I'm on the right track:
function pullRows() {
const ss = SpreadsheetApp.getActive();
const arr = ss
.getSheets()
.filter(s => !s.getName().includes('Master', 'Template', 'Class List';))
.flatMap(s => s.getDataRange(C33:AC33).getValues());
flatten it
ss.getSheetByName('Master')
.getRange(5, 2, arr.length, arr[0].length)
.setValues(arr);
}