I'm looking to copy an sheet to another spreadheet but I would like to include the script function assigned to the button I include it.
Is there a way?
The function I'm using to copy is:
function sheetCopy(){
var source = SpreadsheetApp.getActiveSpreadsheet();
var sheet = source.getSheets()[0];
var destination = SpreadsheetApp.openById("ID_GOES HERE");
sheet.copyTo(destination);
}
And the sheet has a button with a copy/paste script.