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
function onOpen() { | |
DocumentApp.getUi() | |
.createMenu('ID-TO-IMAGE') | |
.addItem('Run', 'runIdToImage') | |
.addToUi(); | |
} | |
function runIdToImage() { | |
var doc = DocumentApp.getActiveDocument(); | |
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
/** | |
* These simple triggers are available in Sheets, Docs, and Forms | |
* Most of this information can be found: | |
* https://developers.google.com/apps-script/guides/triggers/events | |
*/ | |
function onOpen(e) { | |
// { | |
// authMode: 'LIMITED', | |
// source: 'Spreadsheet' || 'Document' || 'Form', | |
// user: 'User' |
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 a custom menu in Google Sheets when the spreadsheet opens. | |
*/ | |
function onOpen() { | |
SlidesApp.getUi().createMenu('Picker') | |
.addItem('Start', 'showPicker') | |
.addToUi(); | |
} | |
/** |
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
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"type": "object", | |
"properties": { | |
"entries": { | |
"type": "array", | |
"items": [ | |
{ | |
"type": "object", | |
"properties": { |
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
function openTab() { | |
var selection = SpreadsheetApp.getActiveSheet().getActiveCell().getValue(); | |
var html = "<script>window.open('" + selection + "');google.script.host.close();</script>"; | |
var userInterface = HtmlService.createHtmlOutput(html); | |
SpreadsheetApp.getUi().showModalDialog(userInterface, 'Open Tab'); | |
} |
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
function doGet(e) { | |
if(!e.parameters.sheetId) { | |
return HtmlService.createTemplateFromFile('Start').evaluate().setSandboxMode(HtmlService.SandboxMode.IFRAME); | |
} else { | |
var html = HtmlService.createTemplateFromFile('Viewer'); | |
//set variable of sheet id to post in hidden input field for async request when page loads | |
html.sheetName = SpreadsheetApp.openById(e.parameters.sheetId).getName(); | |
html.sheetId = e.parameters.sheetId; | |
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
<ul></ul> |
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
function columnToLetter(column, row) { | |
var temp, letter = ''; | |
while (column > 0) { | |
temp = (column - 1) % 26; | |
letter = String.fromCharCode(temp + 65) + letter; | |
column = (column - temp - 1) / 26; | |
} | |
return letter + row; | |
} |
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
function onOpen() { | |
SpreadsheetApp.getUi() | |
.createMenu('MULTI DATA VALIDATION') | |
.addItem('Open', 'openSidebar') | |
.addToUi(); | |
} | |
function onInstall() { | |
installEditTrigger(); | |
onOpen(); |
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
function rosterMaker() { | |
//spreadsheet id of the rosters | |
var SHEET_ID = FormApp.getActiveForm().getDestinationId(); | |
var ss = SpreadsheetApp.openById(SHEET_ID); | |
var form = FormApp.getActiveForm(); | |
//get only the sheets with 'Roster' in the title | |
var sheets = ss.getSheets() | |
.filter(function(sheet) {return sheet.getName().match(/Roster/gi);}); | |
NewerOlder