Gets all events that occur within a given time range, and that include the specified guest email in the guest list.
###Parameters:###
function onOpen() { // find where date maches today, then scroll to the end of sheet, then scroll back to matched date | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = ss.getActiveSheet(); | |
var values = sheet.getSheetValues(1,1,1,sheet.getMaxColumns()); | |
var objvalues = Transpose(values); | |
var today = new Date().setHours(0,0,0,0); // change date format to numbers | |
for(var n=0;n<objvalues.length;++n){ // for each objvalues object run command |
function onOpen() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var menuEntries = [ {name: "Hide", functionName: "myFunction"} ]; | |
ss.addMenu("Scripts", menuEntries); | |
} | |
function myFunction() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var colCount = sheet.getMaxColumns(); | |
var x = 1; |
/** | |
* Reminder script for GMail: A simple Google Apps Script to create a Google Calendar event (reminder) for any mail (with a | |
* specific label). You can then setup ("timed") triggers in Apps Script (hourly, etc) to monitor your Inbox. | |
* How to Use: | |
* 1. Log into Google Drive account and create a Google Script. | |
* 2. Copy and paste the below snippet into the gs file. | |
* 3. Make sure to update the 'reminderLabel', 'calendarName' and 'reminderDuration' as per your preference. | |
* 4. Test the script to make sure it is working properly. | |
* 5. Setup a time-driven Project Trigger (hourly, etc) to automatically run this script and create calendar events. | |
* |
/** | |
* Google Script - Add Fonts. | |
* Add other fonts in Google Spreadsheet. | |
* | |
* a) Open 'Script editor' | |
* b) Add this script | |
* c) Save and run 'onOpen' | |
* d) Go to some 'Spreadsheet' project | |
* e) Click to 'Font Editor' and then to 'Change Font' | |
*/ |
getAllLinks.js
getAllLinks(element) - returns array of all UrlLinks in Document
findAndReplaceLinks(searchPattern,replacement) - changes all matching links in Document
changeCase.js - Document add-in, provides case-change operations in the add-in Menu.
onOpen - installs "Change Case" menu
_changeCase - worker function to locate selected text and change text case. Case conversion is managed via callback to a function that accepts a string as a parameter and returns the converted string.
helper functions for five cases
/** | |
* Extract formula from a cell | |
* | |
* @param {reference} a cell reference from which to extract the formula | |
* @return a string representation of the formula in {reference} | |
* @customfunction | |
*/ | |
function CELLFORMULA(reference) { | |
var ss = SpreadsheetApp; |
function pullJSON() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheets = ss.getSheets(); | |
var sheet = ss.getActiveSheet(); | |
var url="http://example.com/feeds?type=json"; // Paste your JSON URL here | |
var response = UrlFetchApp.fetch(url); // get feed | |
var dataAll = JSON.parse(response.getContentText()); // |
<div style="font-family: sans-serif;"> | |
<? var data = valid(); ?> | |
<form id="form" name="form"> | |
<? if(Object.prototype.toString.call(data) === '[object Array]') { ?> | |
<? for (var i = 0; i < data.length; i++) { ?> | |
<? for (var j = 0; j < data[i].length; j++) { ?> | |
<input type="checkbox" id="ch<?= '' + i + j ?>" name="ch<?= '' + i + j ?>" value="<?= data[i][j] ?>"><?= data[i][j] ?><br> | |
<? } ?> | |
<? } ?> | |
<? } else { ?> |
// The rest of this code is currently (c) Google Inc. | |
// setRowsData fills in one row of data per object defined in the objects Array. | |
// For every Column, it checks if data objects define a value for it. | |
// Arguments: | |
// - sheet: the Sheet Object where the data will be written | |
// - objects: an Array of Objects, each of which contains data for a row | |
// - optHeadersRange: a Range of cells where the column headers are defined. This | |
// defaults to the entire first row in sheet. | |
// - optFirstDataRowIndex: index of the first row where data should be written. This |