Skip to content

Instantly share code, notes, and snippets.

@eichmiller
eichmiller / Google Apps Script Rename
Created April 18, 2013 03:22
I wrote a previous script to create a shared folder system. The root folder is called AMS (short for Appraisal Management System). Inside AMS is a folder for each department. Inside each department folder is a folder for each teacher. This worked great from the administrator perspective, but when the teachers looked in shared with me to find thi…
function rename() {
//Get AMS Root Folder
amsFolder = DocsList.getFolder("Appraisal Management System");
//Get Array of Departmental Folders
deptFolders = amsFolder.getFolders();
//Loop through Departmental Folders
for (i=0;i<deptFolders.length;i++){
@eichmiller
eichmiller / reset
Created February 6, 2013 20:09
Google Apps Password Reset Tool
// This the initial app screen
function doGet() {
//create the application
var app = UiApp.createApplication();
//create the vertical panel to hold widgets
var vp = app.createVerticalPanel().setId('vp');
//style the vertial panel
vp.setBorderWidth(5).setStyleAttribute("border-color", "maroon").setStyleAttribute("font-weight", "bold");
@eichmiller
eichmiller / mediacheckin
Created November 22, 2012 05:30
Google Apps Script Send email on Form Submit
function sendEmail(e) {
//open the spreadsheet and get the email sheet
ss = SpreadsheetApp.openById("0AuD3WXC51A9gdGVScnVlVVNNZkxFZnlSdTZBVHVNUFE")
sheet = ss.getSheetByName("emails");
//read the data into an array
emailArray = sheet.getDataRange().getValues();
//get the teacher name from the form submission.
name = e.values[5];
//loop through the array of names and email addresses
@eichmiller
eichmiller / weightclass.js
Created April 25, 2012 17:10
Determining a weight class
function weightClass() {
//Establish Spreadsheet
var ss = SpreadsheetApp.getActiveSpreadsheet();
//Establish Sheet
var sheet = ss.getActiveSheet();
//Get the cell being edited
var cell = sheet.getActiveCell();
//Get the indeces of the cell being edited
var row = cell.getRowIndex();