This file contains hidden or 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
/** * @OnlyCurrentDoc */ | |
function moveColumns() { | |
// get sheet | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
// select columns to be moved ('collegename' & 'shoesize') | |
var columnsToMove = sheet.getRange("E1:F1"); |
This file contains hidden or 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
/* | |
Get Google Sheet ID. | |
Create hyperlink text in Sheet on open - check to see if already exists. | |
Pass Google Sheet ID to Web App upon user clicking hyperlink text. | |
*/ | |
function onOpen() { | |
// get Google Sheet ID | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); |
This file contains hidden or 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 to get all selected ranges, then loop through each one | |
and extract some specific information (values, rows, columns, etc). | |
*/ | |
function getAllRanges() { | |
// get Google Sheet | |
var ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Sheet1'); |
This file contains hidden or 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
/* | |
Check TimeZone in AppsScript Manifest correct when recreating for someone else. | |
Checks for all file changes within last xhours and sends email with Username/Email Address | |
if there are any. Run Trigger Function to have this setup a recurring trigger. | |
*/ | |
// ************* UPDATE THIS SECTION FOR YOUR GOOGLE DRIVE FILE ************* |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<!-- Add link to jQuery CDN (slim minified): https://code.jquery.com/ so that we can use it | |
in this HTML page --> | |
<script src="https://code.jquery.com/jquery-3.6.0.slim.min.js" | |
integrity="sha256-u7e5khyithlIdTpu22PHhENmPcRdFiHRjhAuHcs05RI=" crossorigin="anonymous"></script> | |
<head> |
This file contains hidden or 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
/* | |
Create Menu item in Google Sheet | |
*/ | |
function onOpen() { | |
SpreadsheetApp.getUi() | |
.createMenu('Custom') | |
.addItem('Display HTML', 'openHTML') | |
.addToUi(); |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<base target="_top"> | |
</head> | |
<body> | |
<p>Hello, World!</p> |
This file contains hidden or 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 showMessageDialog() { | |
// get the spreadsheet User Inteface for later displaying | |
var ui = SpreadsheetApp.getUi(); | |
// get HTML template file | |
var template = HtmlService.createTemplateFromFile('showMyMessage'); | |
// add some data | |
template.message1 = "I've come from Apps Script."; |
This file contains hidden or 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 checkForSheet() { | |
// name of Sheet to look for | |
var sheetName = 'SHEET NAME HERE'; | |
// get spreadsheet | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); |
This file contains hidden or 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 to search Google Drive Filenames for a string and output results into | |
a Google Sheet. | |
Apps Script File Search terms: https://developers.google.com/drive/api/v2/ref-search-terms#file_properties | |
Query string examples: https://developers.google.com/drive/api/v2/search-files#query_string_examples | |
Apps Script File methods: https://developers.google.com/apps-script/reference/drive/file | |
*/ |