Created
August 26, 2016 15:25
-
-
Save mgalgs/733f0f83c74539a3096adfe82e3b1b9d to your computer and use it in GitHub Desktop.
Tools -> Script Editor, and paste in the following code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dayNumToName = [ | |
"Sunday", | |
"Monday", | |
"Tuesday", | |
"Wednesday", | |
"Thursday", | |
"Friday", | |
"Saturday" | |
]; | |
function selectTabBasedOnDay() { | |
var dow = (new Date()).getDay(); | |
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(dayNumToName[dow]); | |
if (sheet !== null) | |
sheet.activate(); | |
} | |
function onOpen() { | |
selectTabBasedOnDay(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment