google-apps-script

Titles in Google Sheets Charts

徘徊边缘 提交于 2020-08-08 05:15:50
问题 When I first create a chart in Google Sheets, the Title is in a movable box that I can select and drag around inside the chart box. If I then change that title programmatically, e.g. chart = chart.modify() .setOption('title',ChartTitleNameReplacement) .build(); selectedSheet.updateChart(chart); the Title jumps up to the top of the chart box and cannot be dragged anywhere. What option setting do I need in the Google Apps Script code to keep that box movable? Alternatively, is there any way of

Titles in Google Sheets Charts

谁都会走 提交于 2020-08-08 05:15:23
问题 When I first create a chart in Google Sheets, the Title is in a movable box that I can select and drag around inside the chart box. If I then change that title programmatically, e.g. chart = chart.modify() .setOption('title',ChartTitleNameReplacement) .build(); selectedSheet.updateChart(chart); the Title jumps up to the top of the chart box and cannot be dragged anywhere. What option setting do I need in the Google Apps Script code to keep that box movable? Alternatively, is there any way of

Google Forms Script ItemResponse getScore() returns null

孤者浪人 提交于 2020-08-07 09:47:28
问题 Not sure if it is a bug or not, but the getScore() method (https://developers.google.com/apps-script/reference/forms/item-response#getscore) always returns null for me, while it is said it should return a double . The form is a Quiz, does accept answers, the score is set to 2 to all questions, the score is being registered in the responses in the Google Form. // Code.gs function onOpen (e) { setOnSubmitTrigger(); } function setOnSubmitTrigger () { var form = FormApp.getActiveForm(); ScriptApp

Google Forms Script ItemResponse getScore() returns null

我是研究僧i 提交于 2020-08-07 09:44:18
问题 Not sure if it is a bug or not, but the getScore() method (https://developers.google.com/apps-script/reference/forms/item-response#getscore) always returns null for me, while it is said it should return a double . The form is a Quiz, does accept answers, the score is set to 2 to all questions, the score is being registered in the responses in the Google Form. // Code.gs function onOpen (e) { setOnSubmitTrigger(); } function setOnSubmitTrigger () { var form = FormApp.getActiveForm(); ScriptApp

Create Dynamic Questions on a Google Form

末鹿安然 提交于 2020-08-07 07:50:51
问题 I have a list of URLs for hundreds of images in a google spreadsheet. I want to create a google form that dynamically picks 50 of these images, displays them and asks a generic like it / hate it question, then submits this data along with the URL to a spreadsheet. Is there a way to do this dynamically? 回答1: AFAIK, you can create form using apps script using a function. But once created it becomes static. Only updating a form would make it as dynamic as possible. References: Dynamic selection

Google Apps Script send email through spreadsheet not working

陌路散爱 提交于 2020-08-06 07:04:22
问题 I have a problem with some Google Script stuff. Basically, my goal is to have the script check to see if a client's case was resolved and then send an email to them that the issue has been resolved. I've gotten the logic done on when to send an email, but every time I try and implement it into the spreadsheet, I get the error: Error You do not have permission to call MailApp.sendEmail. Required permissions: https://www.googleapis.com/auth/script.send_mail (line 8). I've got a simple function

Export a range as a PDF in Google Apps Script

纵然是瞬间 提交于 2020-08-05 09:59:07
问题 I've searched all over for some lines of code that would accomplish what I want, but I'm too unfamiliar with how google apps script works. I've only ever coded in Microsoft excel and although I'm not completely lost, I'm still pretty lost. I am looking for code that would select a range, then "Download as.." the selection to PDF, fit width, portrait, no grid. Ideally this PDF could be sent to a specific folder on my desktop, but I don't know if the apps script supports that. I've found the

Is there a way to speed up/batch Google Calendar read/writes?

走远了吗. 提交于 2020-08-05 07:36:10
问题 I am new to Google Apps Script and learning javascript as I go about this project. Over the course of the introductory codelabs I noted the best practice to read all the data into an array with one command, perform operations, and then write it with one command. I understood how to do this working with Google Sheets but how do I achieve this working with Google Calendar? I have come across a few links discussing batching with Google Calendar API and Advanced Google Services but I didn't

Google Form: How to save multiple file upload in a specific folder?

ε祈祈猫儿з 提交于 2020-08-03 05:48:27
问题 I have created a custom form on Google Form which contains an Upload File Question (allowing multiple files). I'm trying to run a script when submitting the form that creates a folder into a specific destination in Drive and that it saves the files uploaded in this one. But I have no idea how to retrieve the ID of the files uploaded and move them into the new folder. Thank you I managed to create the new folder, but I'm not able to select the uploaded file and save them (or move them) to the

Google Form: How to save multiple file upload in a specific folder?

痴心易碎 提交于 2020-08-03 05:48:06
问题 I have created a custom form on Google Form which contains an Upload File Question (allowing multiple files). I'm trying to run a script when submitting the form that creates a folder into a specific destination in Drive and that it saves the files uploaded in this one. But I have no idea how to retrieve the ID of the files uploaded and move them into the new folder. Thank you I managed to create the new folder, but I'm not able to select the uploaded file and save them (or move them) to the