I'm currently doing this:
//set active spreadsheet to my template
var ss = SpreadsheetApp.openById("MYSHEETKEY");
SpreadsheetApp.setActiveSpreadsheet(ss);
//duplicate active sheet and set a new name
SpreadsheetApp.getActiveSpreadsheet().duplicateActiveSheet().setName(rData[0][1]);
which is creating a new sheet in my template Spreadsheet, quite rightly. What I really need is to create an entirely new copy of the document as a whole, ideally in to a specified folder in my Google Drive. Is this possible?
Thanks as advance!