V
V
Villert2022-03-09 11:06:56
Google Apps Script
Villert, 2022-03-09 11:06:56

Google Sheets - how to script a new sheet with a specific name (date)?

Good afternoon !

There is a table with sheets 03/05/2022, 03/06/2022, 03/07/2022, etc.

please tell me how to make a script to create a new sheet with a specific name
after the next one - say 03/08/2022 and at the same time copy all the data from the previous sheet?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Volodymyr Palamar, 2022-03-09
@Villert

var source = SpreadsheetApp.getActiveSpreadsheet();
var sheet = source.getSheets()[0];

sheet.copyTo(source).setName('newName');

Here is the code for duplicating sheets

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question