I've been working in a project in appscript which is allocated in a Google Sheets file, and I want to copy this same sheet with the data in it and send the copy to another folder. I made this script for the task (for copying I mean):
var CopyOfSheet = SpreadsheetApp.openById(Thischit).copy(Name.of.the.sheet).getId();
var SpecificFolder = DriveApp.getFolderById(ExlID);
var File = DriveApp.getFileById(CopyOfSheet);
SpecificFolder.addFile(File);
File.getParents().next().removeFile(File);
When the function is triggered (by any means even just executing the script) it generates a copy in the selected folder.
But it also copies the appscript code and I don't want the appscript in the copy. How can I copy the sheet without the script? (Remember that the script is in the google sheet that is being copied.)
Thanks in advance.