Skip to content

Instantly share code, notes, and snippets.

View phillypb's full-sized avatar

Phil Bainbridge phillypb

View GitHub Profile
/**
* This script creates the menu item that can easily be selected to run the Function.
*/
function onOpen() {
SpreadsheetApp.getUi()
.createMenu('Admin')
.addItem('Collate and Create', 'collateData')
/**
* Generate Menu items based on data in Google Sheet.
*
* Run the Function to display the popup message to the user after selecting one of the Menu items.
*/
// call this Function as soon as the Google Sheet has opened to generate our Menu items
dynamicMenu();
/**
* Get all Sheet data, call Function to Objectify, then loop through rows and log some items.
*/
function getPrettyData() {
// get spreadsheet
var ss = SpreadsheetApp.getActiveSpreadsheet();
// get active sheet and log name
function replaceTextToImage() {
// ******************** COMPLETE THESE ITEMS ********************
var searchText = "";
var imageURL = "";
var rowHeight = 100;
/**
* A number of Global Variables to speed up repetitive automation.
*/
var theSpreadsheet = SpreadsheetApp.getActiveSpreadsheet();
var timeZone = theSpreadsheet.getSpreadsheetTimeZone();
var logSheet = theSpreadsheet.getSheetByName("Log");
function getFormData(e) {
// get Spreadsheet TimeZone
var timeZone = SpreadsheetApp.getActiveSpreadsheet().getSpreadsheetTimeZone();
// get Form data
var formValues = e.namedValues;
// get specific values from Form ******************
/**
* Code to learn about Exponential Backoff.
* Developed when experiencing 'Rate Limit' issue with updating a Calendar Event of Attendees.
*
* DEVELOPED BY THE GIFT OF SCRIPT: https://www.pbainbridge.co.uk/
*/
function mainFunction() {
/**
* A number of global variables that are re-used throughout this script.
*/
// 5 minute maximum runtime
var maxRuntime = 5 * 60 * 1000;
var ss = SpreadsheetApp.getActiveSpreadsheet();
/**
* A number of global variables that are re-used throughout this script.
*/
// 5 minute maximum runtime
var maxRuntime = 5 * 60 * 1000;
var ss = SpreadsheetApp.getActiveSpreadsheet();
/**
* A number of global variables that are re-used throughout this script.
*/
// 5 minute maximum runtime
var maxRuntime = 5 * 60 * 1000;
var ss = SpreadsheetApp.getActiveSpreadsheet();