I'm trying to copy sheets from what I'm calling a "Master" workbook to a workbook that my staff has access to but I can't seem to get it to copy.
Once I have the script, I'm going to set it up to copy every day. That way I can edit the Master and it will essentially "auto update" for my staff every day.
function copyDoc() {
var sourceSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('General');
var targetSheet = SpreadsheetApp.openById('13ERWTQoXeGb0cIfgfr2ZTsImnwmtaVB5c-Zm9ZZ5o6g').getSheetByName('General');
sourceSheet.copyTo(targetSheet);
}
It just tells me there's an error:
Error
Exception: The parameters (number,number,number,null) don't match the method signature for SpreadsheetApp.Sheet.getRange. copyDoc @ Test Copy.gs:11
I have absolutely no idea what I'm doing or what I should be doing. Essentially I need to copy Sheet 1 through 7 from Workbook A into Sheet 1 through 7 of Workbook B every single day. But the sheets are all already in each Workbook and titled.