google-apps-script

Image crop with AppScripts in Sheets or Drive

我的梦境 提交于 2021-02-11 04:19:20
问题 I am evaluating Google Sheets with AppScripts for a report generator. The requirements include inserting images from Google Drive. One of the input image has a fix format, which I need to crop. ( So the dimensions of the original image and the dimensions of the crop is known.) I am looking for a solution to achieve this outcome, but I am struggling. I looked into the following methods: No image crop function in the Drive API No image crop ( only resize) for the Sheets OverGridImage object No

URL ZOOM PARAMETER for exporting sheet to pdf

假装没事ソ 提交于 2021-02-11 02:46:30
问题 Another question on URL parameters... sorry. Actually, I've been searching a lot about how to solve this, here and pretty much everywhere else, and I found absolutely nothing. Zero! Really appreciate if someone can give me a hand. Here's the thing, I'm exporting a google sheet to pdf with the following URL code. var url = "https://docs.google.com/spreadsheets/d/"+ssID+"/export"+ "?format=pdf&"+ "size=7&"+ "portrait=false&"+ // "zoom_scale=130&"+ "top_margin=0.00&"+ "bottom_margin=0.00&"+

Last modified date in Google App Script GAS sheets

你说的曾经没有我的故事 提交于 2021-02-11 02:44:21
问题 I am trying to get the last modified date of a sheet from a GAS add on which I am developing. My current idea is to get the Drive revision list and then take the last value. This seems a bit overkill for just getting the last modified, I am also worried that this will break if the number of revisions exceeds 1000 as per this link suggests. https://developers.google.com/drive/api/v3/reference/revisions/list Ideally I would like to know the range which has changed too, but I do not think this

Storing an HTML selection into a variable / using that data in Google Sheets

三世轮回 提交于 2021-02-11 02:44:13
问题 I am almost there with an HTML form selector, which creates an array based on data from a google sheets column (done) and populates that data into a dropdown box (done). What I have been trying all weekend to figure out is how to capture the selection of the dropdown option and then lump that into a variable. Here is my google script code that launches the HTML popup: function ClientDropDownHTML() { var template = HtmlService.createTemplateFromFile('index'); var htmlDlg = template.evaluate()

Shift values in Google Spreadsheet

核能气质少年 提交于 2021-02-10 23:45:06
问题 I am making a spreadsheet that is to be used for booking equipment for a club I am part of. I am looking for a way for all the cells in a selected area of a spreadsheet to be moved one to the left at midnight, and ones all the way to the left deleted. I understand that I can just use a trigger to execute this, however I am not sure how to go about writing the function to do this. Any help or suggestions would be appreciated. 回答1: This would be simple if you had a function that could left

Shift values in Google Spreadsheet

﹥>﹥吖頭↗ 提交于 2021-02-10 23:39:50
问题 I am making a spreadsheet that is to be used for booking equipment for a club I am part of. I am looking for a way for all the cells in a selected area of a spreadsheet to be moved one to the left at midnight, and ones all the way to the left deleted. I understand that I can just use a trigger to execute this, however I am not sure how to go about writing the function to do this. Any help or suggestions would be appreciated. 回答1: This would be simple if you had a function that could left

Shift values in Google Spreadsheet

≡放荡痞女 提交于 2021-02-10 23:37:29
问题 I am making a spreadsheet that is to be used for booking equipment for a club I am part of. I am looking for a way for all the cells in a selected area of a spreadsheet to be moved one to the left at midnight, and ones all the way to the left deleted. I understand that I can just use a trigger to execute this, however I am not sure how to go about writing the function to do this. Any help or suggestions would be appreciated. 回答1: This would be simple if you had a function that could left

Add Contact to a ContactGroup

巧了我就是萌 提交于 2021-02-10 22:50:30
问题 I'm trying to add contacts that are in MyContacts into other contact groups. I feel like i've written it correctly but it is not working:- function myFunction() { var MyContact = ContactsApp.getContactsByEmailAddress('XXXX.XXXX@Pearson.com'); var MyGroup = ContactsApp.getContactGroup('Sample'); MyGroup.addContact(MyContact); } XXXX.XXXX@Pearson.com is in my contacts list and I have already created the group Sample but I get the message of 'Cannot convert to . (line 4) Dismiss'. Line for being

Add Contact to a ContactGroup

与世无争的帅哥 提交于 2021-02-10 22:49:55
问题 I'm trying to add contacts that are in MyContacts into other contact groups. I feel like i've written it correctly but it is not working:- function myFunction() { var MyContact = ContactsApp.getContactsByEmailAddress('XXXX.XXXX@Pearson.com'); var MyGroup = ContactsApp.getContactGroup('Sample'); MyGroup.addContact(MyContact); } XXXX.XXXX@Pearson.com is in my contacts list and I have already created the group Sample but I get the message of 'Cannot convert to . (line 4) Dismiss'. Line for being

Add Contact to a ContactGroup

痞子三分冷 提交于 2021-02-10 22:49:31
问题 I'm trying to add contacts that are in MyContacts into other contact groups. I feel like i've written it correctly but it is not working:- function myFunction() { var MyContact = ContactsApp.getContactsByEmailAddress('XXXX.XXXX@Pearson.com'); var MyGroup = ContactsApp.getContactGroup('Sample'); MyGroup.addContact(MyContact); } XXXX.XXXX@Pearson.com is in my contacts list and I have already created the group Sample but I get the message of 'Cannot convert to . (line 4) Dismiss'. Line for being