Upload image from your Computer to Google Drive using HTML-form. Show image via URL (IMAGE function) in your Spreadsheet
The sctipt was originally designed by Kanshi TANAIKE.
Please see the original script and instructions first.
/** | |
* Invokes a function, performing up to 5 retries with exponential backoff. | |
* Retries with delays of approximately 1, 2, 4, 8 then 16 seconds for a total of | |
* about 32 seconds before it gives up and rethrows the last error. | |
* See: https://developers.google.com/google-apps/documents-list/#implementing_exponential_backoff | |
* <br>Author: peter.herrmann@gmail.com (Peter Herrmann) | |
<h3>Examples:</h3> | |
<pre>//Calls an anonymous function that concatenates a greeting with the current Apps user's email | |
var example1 = GASRetry.call(function(){return "Hello, " + Session.getActiveUser().getEmail();}); | |
</pre><pre>//Calls an existing function |
function test_xmlToJson(xmlString) { | |
var xmltext = '<ALEXA VER="0.9" URL="davidwalsh.name/" HOME="0" AID="="><SD TITLE="A" FLAGS="" HOST="davidwalsh.name"><TITLE TEXT="David Walsh Blog :: PHP, MySQL, CSS, Javascript, MooTools, and Everything Else"/><LINKSIN NUM="1102"/><SPEED TEXT="1421" PCT="51"/></SD><SD><POPULARITY URL="davidwalsh.name/" TEXT="7131"/><REACH RANK="5952"/><RANK DELTA="-1648"/></SD></ALEXA>'; | |
var xml = XmlService.parse(xmltext); | |
Logger.log(JSON.stringify(xmlToJson_(xml))); | |
// returns this: | |
//{ | |
// "ALEXA":{ | |
// "@attributes":{ | |
// "VER":"0.9", | |
// "URL":"davidwalsh.name/", |
function getDataElementsFromSheet() | |
{ | |
var sheet = SpreadsheetApp.getActiveSheet(); // get active sheet | |
var range = sheet.getDataRange(); // get range object containing data | |
var data = range.getValues(); // write range data into array called data | |
getDataElements(data); // To see the result run function and press <Ctrl + Enter> | |
} | |
function getDataElements(data) | |
{ |
/** | |
* Retrieves all the rows in the active spreadsheet that contain data and logs the | |
* values for each row. | |
* For more information on using the Spreadsheet API, see | |
* https://developers.google.com/apps-script/service_spreadsheet | |
*/ | |
function readRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); |
// gentleman script for google forms | |
// | |
// gets submitted valus: | |
// 1. question label | |
// 2. question id | |
// 3. response value | |
// | |
// ⚠️ This is Form trigger. | |
// Open script editor from form interface | |
// Install it wia Triggers |
The sctipt was originally designed by Kanshi TANAIKE.
Please see the original script and instructions first.
function someImportantFunction() { | |
// [ 1 ]. do some stuff | |
// | |
// | |
// | |
Logger.log('Success!'); | |
// [ 2 ]. Report the execution | |
var recipient = 'makhrov.max@gmail.com'; // change!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
// |
// SETTINGS | |
var C_VALS = ['ABC' , 'DEF' , 'GHI' , 'JKL' , 'MNO' , 'PQR' , 'STU' , 'VWX' , 'YZA']; | |
var C_SHEETS = ['Sheet1']; | |
var C_COLUMN = 'H'; | |
function test_deleteSheetRowsWithSettings() | |
{ | |
var values = C_VALS; | |
var sheets = C_SHEETS; |
// __ | |
// /_ | | |
// | | | |
// | | | |
// | | | |
// |_| | |
// Set Bot, copy token: | |
// https://t.me/botfather | |
// set your token ↓ | |
var token = "1815465433:AAGpRcd--KsZycuSYmBOCDcVvws5lSvkuqw"; |
function onOpen() { | |
var ui = SpreadsheetApp.getUi(); | |
ui.createMenu('😎📬 run me 2x times') | |
.addItem('please let script to see your email', 'install') | |
.addToUi(); | |
} | |
// function test() { | |
// var e = { |