https://basescripts.com/how-to-select-a-sheet-and-set-it-active-with-google-apps-script
How to select a sheet and set it active with google apps script