google-apps-script

Login to website using Google Apps script

喜欢而已 提交于 2021-01-29 07:14:35
问题 Login in to a website using Google Apps Script has been discussed here previously and I most probably have seen them all and tried them all. But nothing seems to work. I must oversee something and would appreciate your help. I am trying to login to this website https://teslaclub.ch/clubdesk/www?action=login& As it looks like the relevant login information is the following: <form method="post" action="www" accept-charset="UTF-8"> <input type="hidden" name="action" value="login"> <input type=

Grant permissions on open for first time for a bound script in Google Sheets

假如想象 提交于 2021-01-29 07:12:50
问题 I created a Google Spreadsheet template with a script bounded to it that, for example, when runs creates a copy of a Google Docs file with various tags in the text and replaces them with data from the spreadsheet or opens a prompt form where I can introduce some data and it fills cells with that. When the script runs for first time it request for user's authoritzation, the user has to give authoritzation, then the script stops running and him has to run the code again. I would like to grant

Problems when using a Google spreadsheet add-on by multiple users [closed]

╄→尐↘猪︶ㄣ 提交于 2021-01-29 07:10:16
问题 Closed. This question needs debugging details. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 months ago . Improve this question In a self-developed add-on for Google Sheets, the functionality has been added that a sound file will be played from a JavaScript audio player in the side bar, depending on the selection in the table. For the code itself see here. When users have installed the add-on from the

Google script .setFormula error with string value [duplicate]

故事扮演 提交于 2021-01-29 07:06:52
问题 This question already has an answer here : .setFormula() and received error missing ) argument list (1 answer) Closed 5 months ago . I'm new to this so please forgive the simple question. I'm trying to insert the following formula into cell E18 of google sheet L2_R1 Final Product: =if(D17="Poor",0,if(D17="Acceptable",1,if(D17="Excellent",2,))) I've gone about it the following way: var sheet4= SpreadsheetApp.getActiveSpreadsheet().getSheetByName("L2_R1 Final Product"); var r2_fpr1_1 = sheet4

Google Apps Script - Copy rows from one sheet containing today's date into another

白昼怎懂夜的黑 提交于 2021-01-29 07:05:53
问题 What I'm trying to do is within one spreadsheet, look at sheet "Source", if a cell in column B contains today's date, then copy cells between A:B for that cell and paste onto next empty row in sheet "Destination". Repeat for all cells containing today's date. This works if I'm looking for a text but essentially I'm trying to make this run automatically everyday when the date changes and I can't get the date function to work properly. Essentially at the turn of each day it would copy today's

How to insert an emoji into an email sent with GmailApp?

痴心易碎 提交于 2021-01-29 06:40:58
问题 I have a GAS script that sends automated emails and would like to include a couple of emojis. I've tried using shortcodes and copying/pasting, but nothing so far seems to have worked. Just wanted to see if there was anything I was missing. Edit: Here's the code: var title = rowData.publicationTitle; var journal = rowData.journalTitle; var url = rowData.publicationUrl; //Emoji goes here in the body: var body = "Hi " + firstName + "!<br><br>I noticed your article <a href='" + url + "'>“" +

Google Sheet - Send Email

烈酒焚心 提交于 2021-01-29 06:13:58
问题 I need my google sheet to send emails every time a condition becomes true. In this case, every time value of C2 is lower than value of J2. On the cell L2 there is the email address. The code (found online and just edited) function CheckPrice() { var LastPriceRange = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Alerts").getRange("C2"); var LastPrice = LastPriceRange.getValue(); var EntryLimitRange = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Alerts").getRange("J2"); var

How to run a script on multiple sheets, Google Sheets

倖福魔咒の 提交于 2021-01-29 06:11:58
问题 I have a script that I would like to run on specific tabs in my Google worksheet, but not necessarily all of the tabs. I tried doing two differently named scripts, but only the last one that was saved will run. How can I code this script to run on specific tabs? This is my beginning script: function onEdit() { var s = SpreadsheetApp.getActive().getSheetByName('Proposal'); s.showRows(1, s.getMaxRows()); s.getRange('B:B') .getValues() .forEach( function (r, i) { if (r[0] == 'Hide') s.hideRows(i

Find Replace all values in a column Google script/JavaScript

丶灬走出姿态 提交于 2021-01-29 06:06:21
问题 I need to find multiple values in all cells in a column and replace them with different values IF I only have one value to find/replace my function works great function FindReplace() { var ss = SpreadsheetApp.getActiveSheet(); var col = [].concat.apply([], ss.getRange(2,3,ss.getLastRow()).getValues()); ss.getRange(2,3,ss.getLastRow()).setValues(col.map(fr)); function fr(input){ return [input.replace("something","something else")]; } } But I need to find all values in a list and replace them

Time driven triggered script producing error/Disabled last run error

回眸只為那壹抹淺笑 提交于 2021-01-29 06:03:44
问题 I am having an issue with a combination of scripts that I operate. I have two scripts. The first is time triggered, which when activated sets off the second script. I will copy these scripts below: function timeTriggersHWM() { var myCell=SpreadsheetApp.getActive().getSheetByName("Overview").getRange("AA1"); var cellValue=myCell.getValue(); var time=cellValue; ScriptApp.newTrigger('highWaterMark').timeBased().after(time).create(); } This script should trigger the 'highWaterMark' script when a