This is a sample script for using the values submitted from the HTML form using Google Apps Script and Javascript. In this case, the values include the files.
<form>
Text: <input type="text" name="sampleText1" /><br />
Single file:
This is a sample script for using the values submitted from the HTML form using Google Apps Script and Javascript. In this case, the values include the files.
<form>
Text: <input type="text" name="sampleText1" /><br />
Single file:
This is a sample Google Apps Script for running the specific function when the specific sheet is edited.
Please copy and paste the following script to the container-bound script of Spreadsheet and set sheets
object.
// When the cells are edited, this function is run by the fire of event trigger.
function exportSpreadsheet() { | |
//All requests must include id in the path and a format parameter | |
//https://docs.google.com/spreadsheets/d/{SpreadsheetId}/export | |
//FORMATS WITH NO ADDITIONAL OPTIONS | |
//format=xlsx //excel | |
//format=ods //Open Document Spreadsheet | |
//format=zip //html zipped | |
function docToPDF() { | |
// ID of Google Doc | |
var docID = 'ENTER ID HERE'; | |
// ID of destination folder | |
var folderID = 'ENTER ID HERE'; | |
/* | |
A number of Global Variables to be accessed throughout the scripts to | |
reduce effort in updating in future. | |
*/ | |
// Event ID column number | |
var eventIDCol = 1; | |
// Status column number | |
var statusCol = 2; |
/* | |
Function to get Google Form data. Needs onFormSubmit trigger. | |
*/ | |
function getFormData(e) { | |
// get Form data | |
var formValues = e.namedValues; | |
// get row Form data is written to in spreadsheet |
/* | |
Function to iterate through 1 level of sub-folders in a | |
Google/Shared Drive folder and extract creation/modified dates. | |
*/ | |
function searchFolders() { | |
try { | |
// log start of script in sheet | |
logEvent('Starting script.'); |
/* | |
Global Variables that may need to be tweaked and are easier to access by placing here. | |
*/ | |
// Maximum runtime of script in minutes to prevent timeout (5 minutes 30 seconds) | |
var maxRuntime = 5.5 * 60 * 1000; | |
/* |
/* | |
Create a prefilled URL for a Google Form with 2 questions on it. | |
*/ | |
function prefillURL() { | |
try { | |
// data to pass to Google Form | |
var shoeSize = 8; | |
var someText = 'The Gift of Script'; |