Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

How to open a specific tab based on today's date (Google Sheets)

$
0
0

I've made a 'Google Sheets' with 31 tabs for the dates of the month (1-31)How do I write a script that makes the spreadsheet open to that days tab?e.g. open tab 25 if today is Aug 25th

I imagine (from a few other scripts I've seen) that it's something like:

function onOpen() {  var date = getDate(now,'d')  var ss = SpreadsheetApp.getActiveSpreadsheet();  ss.setActiveSheet(ss.getSheets()[date]);  }

but I've never used this programming language and have no idea.

also, the tabs are named 1, 2, 3.. etc if that's any easier to code.


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>