In Google spreadsheets, i would like to perform a simple copy/rename of an existing spreadsheet in a workbook using a script. All the examples i have found online are copying from the active spreadsheet. Can you not perform the below task without first activating/selecting the spreadsheet i want to duplicate?
Example: My workbook contains the following sheet names: "Orange", "Blue"
I want to make a copy of "Blue" and rename it to "Red". So i am left with now 3 sheets "Orange", "Blue", "Red" all while keeping my active spreadsheet on "Orange".