This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//load configuration details and start logging - creates and sets up sheets the first time they are run | |
var CONFIG_SPREADSHEET_KEY = '<ssid_goes_here>'; | |
var Config = SettingsManager.load(CONFIG_SPREADSHEET_KEY); //Add Mafviu9bMfg9xVu21LGfpWnHAGDwXQ1CH in Resources > Libraries | |
Logger = BetterLog.useSpreadsheet(Config['logSpreadsheetId'].value);//Add MYB7yzedMbnJaMKECt6Sm7FLDhaBgl_dE in Resources > Libraries | |
// trigger this function | |
function outerLoop() { | |
try { | |
// to calc elapsed time | |
var isOverMaxRuntime = false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Creates new spreadsheets based on a column containing email addresses | |
// in the starting spreadsheet. | |
// Each new spreadsheet will contain the full set of rows for that email address. | |
// It will then be shared with that email address and a link emailed. | |
var EMAIL_COLUMN = 2; //Use the number: A=1,B=2,Z=26 etc | |
var ALSO_SHARE_WITH = ""; // Add any additional addresses here. Separated multiples with commas. | |
var NUM_HEADER_ROWS = 1; // The number of header rows. | |
// Do not change anything below this line | |
// 24 Nov 2010 - test mode works correctly after Google changes (session broke after Browser.msgBox) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Spreadsheet Filter - a script that runs as a service and allows users | |
// to view just their data from a spreadsheet and optionally* others' data | |
// too as granted by the spreadsheet owner. | |
// | |
// * requires a sheet named "Additional Access" with 2 columns: | |
// "User" (1st column heading) Email of a user who has been delegated access | |
// to others' data; | |
// "Additional access" (2nd column heading) Comma separated list of emails of | |
// users for which the first user will be given access. Use * to indicate any user. | |
// Version: 11 March 2011 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Invokes a function, performing up to 5 retries with exponential backoff. | |
* Retries with delays of approximately 1, 2, 4, 8 then 16 seconds for a total of | |
* about 32 seconds before it gives up and rethrows the last error. | |
* See: https://developers.google.com/google-apps/documents-list/#implementing_exponential_backoff | |
<h3>Examples:</h3> | |
<pre>//Calls an anonymous function that concatenates a greeting with the current Apps user's email | |
var example1 = GASRetry.call(function(){return "Hello, " + Session.getActiveUser().getEmail();}); | |
</pre><pre>//Calls an existing function | |
var example2 = GASRetry.call(myFunction); |