Here’s the Google Apps Script code that actually makes your “secret message” vanish.
function onOpen() {
var time = 10; // Wait Time (in seconds)
var ss = SpreadsheetApp.getActiveSpreadsheet();
ss.toast("This message will disappear after " + time + " seconds");
Utilities.sleep(time*1000);
ss.toast("We are now sending this private note to the shredder");
ss.getActiveSheet()
.getRange(1, 1, ss.getLastRow(), ss.getLastColumn()).clear();
}
No comments:
Post a Comment