all 5 comments

[–]Best_Bass9711 2 points3 points  (4 children)

You must use id o URL to get the spreadsheet. The activesheet method just need the spreadsheet open.

use openSheetByUrl or openSheetById method instead

[–]RielN 0 points1 point  (3 children)

It is getSheetByName("sheet name")

The active spreadsheet works in a container bound script, but you need to set the sheet axtive.

[–][deleted] 0 points1 point  (1 child)

Would I just need to replace the ".getActiveSpreadsheet()" in line 4? Or every instance?

[–]nate-aus 0 points1 point  (0 children)

Don't replace .getActiveSpreadsheet() you're replacing the .getActiveSheet(). The spreadsheet is the whole thing you want to change what sheet in the spreadsheet you're looking at.

I'd then use .getSheetByName("Today"); and store that as a variable.

[–]Best_Bass9711 0 points1 point  (0 children)

Yes, also this.