google-apps-script

How to delete triggers that own by other users in Google Apps Script?

允我心安 提交于 2020-06-17 09:33:21
问题 I have an installable trigger that should supposed to created once. But I found out that some of my coworkers have rerun my code and recreated another 3 triggers that exactly the same with it. I felt so silly that I didn't add any conditional statement of that... Anyway, now I want to delete these extra triggers. But I cannot find the delete/edit button on the console UI of the GAS project. And I've also tried ScriptApp.getProjectTriggers() , but it still list the triggers of the project that

How to automatically switch from view mode to edit mode and vice-versa

痞子三分冷 提交于 2020-06-17 09:32:09
问题 I have several sheets as subjects in my Google Spreadsheet where attendance are recorded from an android app. When I select View mode to Edit mode, attendance can be recorded. By default I want to keep it in view mode so that students can NOT submit attendance outside the time given by me as a owner of the sheets or the class teachers (editors). Please note that my sheet users are: me as a owner and also editor course teachers as a editors (several sheets means several subjects are there) the

Google app script: upload a csv file from html service

人盡茶涼 提交于 2020-06-17 09:09:28
问题 I'm trying to upload a csv file from an html service in google sheets, and after some research I found some code which seemed to be working at the time: html service call: function importAnalysis() { var html = HtmlService.createHtmlOutputFromFile('Import') .setWidth(1524) .setHeight(800); SpreadsheetApp.getUi() .showModalDialog(html, 'Import d\'analyse'); } html template: <!DOCTYPE html> <html> <body> <form> <input type="file" name="analysisCsv" accept=".csv"> <input type="button" onclick=

Combining Data From Many Cells into One

。_饼干妹妹 提交于 2020-06-17 08:35:17
问题 Im putting together a pretty lengthy spreadsheet in google spreadsheets. This spreadsheet contains information about products ie name, brand, part number, ect... I was helped previously and given some nice solutions but I am still running into limitations. What I am trying to do is generate, automatically, a description field based on information in other cells. The formula I am using in the descriptions column is ="Brand Name"&" "&A3&" "&B3&" "&(joinVals(E3:G3," x "))&" "&K3 joinVals(E3:G3,"

Combining Data From Many Cells into One

人盡茶涼 提交于 2020-06-17 08:34:09
问题 Im putting together a pretty lengthy spreadsheet in google spreadsheets. This spreadsheet contains information about products ie name, brand, part number, ect... I was helped previously and given some nice solutions but I am still running into limitations. What I am trying to do is generate, automatically, a description field based on information in other cells. The formula I am using in the descriptions column is ="Brand Name"&" "&A3&" "&B3&" "&(joinVals(E3:G3," x "))&" "&K3 joinVals(E3:G3,"

getActiveSpreadsheet() always returns null

拥有回忆 提交于 2020-06-17 07:37:59
问题 Okay, so I was following this tutorial here about how to set up a simple Google App Script and I was stuck at around the 18:50 mark. I was getting an error message while doning the exact same thing as in the video. I have this code in my Code.gs file: function myFunction() { var app = SpreadsheetApp; var ss = app.getActiveSpreadsheet(); var activeSheet = ss.getActiveSheet(); activeSheet.getRange("D2").setValue(99); } and a spreadsheet open in another tab. But everytime I try to run

getActiveSpreadsheet() always returns null

做~自己de王妃 提交于 2020-06-17 07:36:22
问题 Okay, so I was following this tutorial here about how to set up a simple Google App Script and I was stuck at around the 18:50 mark. I was getting an error message while doning the exact same thing as in the video. I have this code in my Code.gs file: function myFunction() { var app = SpreadsheetApp; var ss = app.getActiveSpreadsheet(); var activeSheet = ss.getActiveSheet(); activeSheet.getRange("D2").setValue(99); } and a spreadsheet open in another tab. But everytime I try to run

How curl maps onto Google App Script URLFetchApp

随声附和 提交于 2020-06-17 05:01:45
问题 I'm looking to implement Stripe in Google Apps Script, which comes with a URLFetch feature for communicating with third parties. However, I'm confused how the curl format that Stripe uses maps onto URLFetch. Here's an example of a Stripe call from their documentation: curl https://api.stripe.com/v1/charges \ -u testtoken123: \ -H "Idempotency-Key: testkey" \ -d amount=2000 \ -d currency=usd \ -d description="Charge for jenny.rosen@example.com" \ -d source=tok_mastercard And the URLFetchApp

How to count new Google sheet links

你说的曾经没有我的故事 提交于 2020-06-17 04:20:33
问题 I have asked long time ago and got a great answer to the this question: "Google Sheets: count numbers of HYPERLINKS where value > 0" Google Sheets: count numbers of HYPERLINKS where value > 0 Now google has changed their hyperlinks to insert multiple hyperlinks in a cell - nice... But they also do NOT insert it in this way anymore: =HYPERLINK("http:/www.test.com", 100") So now my old question comes up again: How to count number of cells with HYPERLINKS where value > 0 回答1: I believe your goal

How to count new Google sheet links

假装没事ソ 提交于 2020-06-17 04:20:26
问题 I have asked long time ago and got a great answer to the this question: "Google Sheets: count numbers of HYPERLINKS where value > 0" Google Sheets: count numbers of HYPERLINKS where value > 0 Now google has changed their hyperlinks to insert multiple hyperlinks in a cell - nice... But they also do NOT insert it in this way anymore: =HYPERLINK("http:/www.test.com", 100") So now my old question comes up again: How to count number of cells with HYPERLINKS where value > 0 回答1: I believe your goal