I'm trying to create a new spreadsheet once we select the specific function from the custom menu item that's selected. I want the new spreadsheet to be "Sheet" and "Timestamp".
I have this created but it's giving an error:
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var menuEntries = [{name: "Generate Traffic Sheet", functionName: "newSheet"}];
ss.addMenu("Generate Traffic Sheet", menuEntries);
}
function newSheet () {
var ss = SpreadsheetApp.create(name)
var d = new Date();
var timeStamp = d.getTime();
ss.setName(timeStamp)
}
Can anyone point me in the right direction?
Best Answer
Use the following code to accomplish your task:
Code
Remarks
Good luck and happy coding !!