Recently a potential employer posted a Job on odesk, wanted a script to clear the Google Spreadsheet content daily using Google Spreadsheet PHP API. I told him about Google Apps Script, and how we can use it to achieve this as using PHP API wasn't a requirement. Using Google Apps Script we can clear the content of the Google Spreadsheet daily or on specific time of the day. 1) Open the spreadsheet and click Tools > Script Editor. 2) Copy and Paste the following Google Apps Script
function onOpen() {
Save and give relevant name to the script. 3) Set Trigger to execute the 'clear' function at midnight Triggers > Current Scripts Trigger > Add New This script also adds a new menu to toolbar, Scripts > Clear We can set different type of triggers, for more read script guide. - P.S. Tad, Enjoy! |








