google-apps-script

Set Permission for getEmail to Work for Users on Same G Suite Domain

99封情书 提交于 2020-04-17 21:41:23
问题 I have a simple script that gets the user email and date/time when a cell is edited on a google sheet. This script works when I run it; however, when a user in my G Suite domain runs the script it returns a blank email. I have searched a bit about this and know that this occurs when triggered by onEdit but was under the impression that it would work if authorized by the script creator when all users are in the same G Suite Domain. Here is an example of the code that I am running: function

Menu Items not appearing after deploying google App Script as Sheets Add-On

青春壹個敷衍的年華 提交于 2020-04-17 20:52:28
问题 I have developed a script and deployed & published it as Add-On, this is internal app. I am able to see Add-On in Sheets, but only main menu is visible. Menu items created in onOpen(e) are not visible. These menu's are visible when I performed testing but not working only while installing in another user. I guess I am missing something in deployment. Can someone help me with the same? Step1: I clicked on Publish-->Deploy as add-on--> got message as "You must configure the G Suite Marketplace

Menu Items not appearing after deploying google App Script as Sheets Add-On

无人久伴 提交于 2020-04-17 20:52:18
问题 I have developed a script and deployed & published it as Add-On, this is internal app. I am able to see Add-On in Sheets, but only main menu is visible. Menu items created in onOpen(e) are not visible. These menu's are visible when I performed testing but not working only while installing in another user. I guess I am missing something in deployment. Can someone help me with the same? Step1: I clicked on Publish-->Deploy as add-on--> got message as "You must configure the G Suite Marketplace

How to create Google Form Quiz using Google Apps Script or GAS?

╄→гoц情女王★ 提交于 2020-04-17 20:41:50
问题 Is it possible to create a quiz form using GAS from a list of questions and answers on the spreadsheet? I'm making a word test for English learners, on which test-takers are asked to type an answer for each question. I've created a quiz with multiple questions or with radio buttons..., but I have been not able to import TEXT answers from spreadsheets to the TEXT-type quiz. The script I have is below... function myFunction() { var ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(

GAS - Issue with Removing Duplicates from Array

别等时光非礼了梦想. 提交于 2020-04-17 20:29:08
问题 I have a column with a set of numbers I am prepping for a query. Some of these numbers have leading zeros and I will need to keep it on the list with leading zeros and without leading zeros. What I have done so far is to create a column of values with leading and without leading zeros. Here is an example of the array when I getValues on the column. [[1],[2],[001],[002],[1],[2]] The end result should be... [[1],[2],[001],[002]] The last two were dropped because they were duplicates and I only

Unzip File Only If New in Google Apps Scripts

安稳与你 提交于 2020-04-17 20:05:13
问题 I have a folder (let's call it the source folder) on Google Drive that is updated from time to time with new zip files (underlying files are PDFs). I am trying to use Google Apps Script to unzip only the new zip files and place the underlying PDFs in another folder (let's call it the destination folder). I am currently using the following code to unzip the files in the source folder, running on a time-based trigger. My current code does not differentiate between old and new zip files so I am

Insert table from gmail to google spreadsheet by google script

两盒软妹~` 提交于 2020-04-17 05:55:49
问题 I recive an email with table many times in one day it can be 10x2 or 40x2 or something like this. Every time I need to paste this table in sheet start from cell A1/ Now I have this code, but it paste whole table to cell A1: var SEARCH_QUERY = "label:inbox is:unread to:me subject:importnumbers"; // Credit: https://gist.github.com/oshliaer/70e04a67f1f5fd96a708 function getEmails_(q) { var emails = []; var threads = GmailApp.search(q); for (var i in threads) { var msgs = threads[i].getMessages()

Overwriting Google sheets (for form response) rows if duplicate entered

不打扰是莪最后的温柔 提交于 2020-04-17 04:33:28
问题 So, I've been trying to figure out how to stop the duplicate rows appearing in my google sheets response output from a google form. If found this link which sounds like it does exactly what I want (Form Google Script Prevent Duplicates), but cannot for the life of me work out how to edit the given answer to work on my sheet. I have included a screenshot of my workbook to give an example of the structure of the data I'd like the edited code to run on, and also below is my attempt at making the

Overwriting Google sheets (for form response) rows if duplicate entered

限于喜欢 提交于 2020-04-17 04:32:21
问题 So, I've been trying to figure out how to stop the duplicate rows appearing in my google sheets response output from a google form. If found this link which sounds like it does exactly what I want (Form Google Script Prevent Duplicates), but cannot for the life of me work out how to edit the given answer to work on my sheet. I have included a screenshot of my workbook to give an example of the structure of the data I'd like the edited code to run on, and also below is my attempt at making the

How can I get a macro to automatically trigger when a cell reaches a certain value in a Google Sheet?

▼魔方 西西 提交于 2020-04-16 09:15:10
问题 What I need is for a macro I've recorded called SwitchHotSeat to trigger when the value of cell F3 goes above £1,000,000.00 0r 1000000 or the LEN of cell F3 goes over that length. I can find guides for doing this in Excel, but not for Google Sheets. below is just the code for my macro. function SwitchHotSeat() { var spreadsheet = SpreadsheetApp.getActive(); spreadsheet.getRange('3:3').activate(); spreadsheet.getActiveSheet().deleteRows(spreadsheet.getActiveRange().getRow(), spreadsheet