Reputation: 31
I want to duplicate spreadsheets, basically copy of templates to new spreadsheets via google Sheets APIs. There is a copyTo function that can copy only a specific sheet from a spreadsheet. But there seems to be no option to copy the whole spreadsheet. I don't want to access customer google drive for this duplicate need. Is there any other option to make a copy of the whole google spreadsheet to a new spreadsheet without the need of accessing google drive (or Drive API)?
Upvotes: 0
Views: 118
Reputation: 26796
Sample:
var ss = SpreadsheetApp.getActiveSpreadsheet();
ss.copy("Copy of " + ss.getName());
Upvotes: 1