Answer the question
In order to leave comments, you need to log in
How to create a copy of a specific sheet in Google Sheets?
Good afternoon. There was a question about copying a certain sheet in the table. Wrote a small macro to create a duplicate, but the script copies the page that is active. Please tell me how to write a macro so that a certain page is copied, for example, only the first one. (macro attached to button)
function CopySheet() {
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.getRange('U472').activate();
spreadsheet.duplicateActiveSheet();
spreadsheet.moveActiveSheet(5);
spreadsheet.getActiveSheet().setName('Enter date');
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question