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 assignEditUrls() { | |
var form = FormApp.openById('yourFormKey'); | |
//enter form ID here | |
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('yourWorksheetName'); | |
//Change the sheet name as appropriate | |
var data = sheet.getDataRange().getValues(); | |
var urlCol = ; // column number where URL's should be populated; A = 1, B = 2 etc | |
var responses = form.getResponses(); |
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 conditionalForm() { | |
var sheetId = FormApp.getActiveForm().getDestinationId(); | |
var ss = SpreadsheetApp.openById(sheetId); | |
var form = FormApp.openById('FORM_ID'); | |
var item = form.addListItem(); | |
item.setTitle('title') | |
.setChoices([ | |
item.createChoice('option1'), | |
item.createChoice('option2'), | |
item.createChoice('option3') |
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
/* Here are the example Google Form and Spreadsheet associated with this code | |
https://docs.google.com/forms/d/e/1FAIpQLSczl18O39stzPCROGUHt6jk3yq-TFtL2rR9egS1l5Ym42OQIg/viewform?usp=sf_link | |
https://docs.google.com/spreadsheets/d/18B7HEbLTmu00yvT1Ss2Sn75i6rbvOx4_6-3Z2y3mfRs/edit?usp=sharing | |
You can make your own Google Form, and then use those identifiers to put into the function below | |
This particular function will report on how many people are coming to a potluck and what items they plan on contributing. | |
This version needs more improvement. | |
*/ |
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
// ***** WARNGING::: UNTESTED CODE / Failing Code ******** | |
// Could not continue testing as I did not have a GSuite account to enable DriveApp features | |
function getProjDetails(itemResponses) { | |
// Get project and application names | |
for (var j = 0; j < itemResponses.length; j++) { | |
var itemResponse = itemResponses[j]; | |
var question = itemResponse.getItem().getTitle(); | |
if (question == 'What is the name of your project?') |
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 onOpen() { | |
/*var spreadsheet = SpreadsheetApp.getActive(); | |
var menuItems = [ | |
{name: 'auto translate', functionName: 'auto_translate'}, | |
{name: 'create test sheet', functionName: 'create_test_sheet'} | |
]; | |
spreadsheet.addMenu('Directions', menuItems);*/ | |
SpreadsheetApp.getUi() | |
.createMenu('English Training') |
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
var sheet2 = SpreadsheetApp.getActive().getSheetByName('Sheet1'); | |
var sheet = SpreadsheetApp.getActive().getSheetByName('Sheet1'); | |
var sheetFindPhone = SpreadsheetApp.getActive().getSheetByName('findPhone'); | |
var sheetCallback = SpreadsheetApp.getActive().getSheetByName('Callback'); | |
var baseRow = 2; | |
var idToIgnore = []; | |
var shopId = 15; | |
var productId = [34,41,45,52,54,61,74,78]; |
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 doGet() { | |
return HtmlService.createHtmlOutputFromFile('Index'); | |
} | |
function getLoc(value) { | |
var destId = FormApp.getActiveForm().getDestinationId() ; | |
var ss = SpreadsheetApp.openById(destId) ; | |
var respSheet = ss.getSheets()[0] ; | |
var data = respSheet.getDataRange().getValues() ; | |
var headers = data[0] ; | |
var numColumns = headers.length ; |
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
/** | |
script adapted from https://www.youtube.com/watch?v=pXUsW6VRQak | |
*/ | |
function myFunction() { | |
var sheetName = 'Sheet1'; | |
var formId = '1LnmQRJX0l586EvNeXYNLujO2vqhqB-Grtfe1J5zfFWI'; | |
var title = 'Form Title here'; | |
var description = | |
'Form description here.' + | |
'This should really be moved to a cell in the sheet.' + |
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
/** | |
* @author reubenj1999@gmail.com (Reuben Gardos Reid) | |
* | |
* @desc On a form submit, the script triggers, adds an event with the | |
* selected equipment resource invited in a master calendar. Note that | |
* in this implementation it is assumed that the user does not have admin | |
* access and the account associated with this script must be subscribed | |
* to all of the resource calendars; otherwise, the script will not be | |
* able to find the resources and will fail to invite them to the event. | |
*/ |
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
// Глобальные переменные | |
var email = Session.getEffectiveUser().getEmail(); // адрес пользователя | |
email = email.toLowerCase(); | |
var date = new Date(); | |
var SPREADSHEET_ID = "0ApcwrJ2inIl8dGxpdlJ4VGJTM0RYX1c3Ulo4b3hJbXc"; | |
var doc = SpreadsheetApp.openById(SPREADSHEET_ID); | |
var s = doc.getActiveSheet(); | |
var userName = Session.getEffectiveUser().getUsername(); | |
var total = 0; // Общее количество баллов | |
var score = [ ]; // Массив отметок |
NewerOlder