google-apps-script

Custom Formula to look at a different GSheet

北城余情 提交于 2021-02-11 17:53:44
问题 I am still trying to wrap my head around using script, so my apologies if this is basic. I have a summary Spreadsheet that pulls values from hundreds of other documents. This used (too many) importrange formulas, but many of these are now #REF or ...Loading. I am trying to create a custom formula that will mimic the importrange function and return the values. I thought the hard part would be getting the formulas to update when another document was updated, but I have fallen right at the start

Google Script Move Folders

非 Y 不嫁゛ 提交于 2021-02-11 17:50:45
问题 I would like to move an entire folder including its subfolder to another folder using google script. I found this sample script on http://ctrlq.org/. However, the getfiles() method seems to limit to files under that folder. How can I solve this problem? Thanks in advance. function moveFiles(source_folder, dest_folder) { var files = source_folder.getFiles(); while (files.hasNext()) { var file = file.next(); dest_folder.addFile(file); source_folder.removeFile(file); } } 回答1: there is no need to

How to set the go to sections on a Google Forms question using app script

此生再无相见时 提交于 2021-02-11 17:50:42
问题 I have a Google form where some of the fields are "static" content, and some are populated by app script from a Google sheet which will be run on a daily basis. I nearly have it how I want it, but not quite. I have a couple of dropdown lists that need to contain choices that navigate to different sections of the form, e.g: Phill / Beacon Hill - Go to section called "Beacon Hill Jane / Harbord - Go to section called "Harbord" Fred / Beacon Hill - Go to section called "Beacon Hill" etc... What

How to delete User Property Services when User deletes G-Suite Add-on

吃可爱长大的小学妹 提交于 2021-02-11 17:05:54
问题 I'm developing a G-Suite add-on that is storing user auth tokens for an external API within User Property Services as Google recommends. I'm planning to implement the OAuth2 Service as well for publication purposes. My assumption would be that when a user deletes an add-on, the property services associated with that user (and thereby their auth tokens) are deleted as well. However, I haven't found any documentation that says Google deletes a users property services storage when a user

How to delete User Property Services when User deletes G-Suite Add-on

雨燕双飞 提交于 2021-02-11 17:05:41
问题 I'm developing a G-Suite add-on that is storing user auth tokens for an external API within User Property Services as Google recommends. I'm planning to implement the OAuth2 Service as well for publication purposes. My assumption would be that when a user deletes an add-on, the property services associated with that user (and thereby their auth tokens) are deleted as well. However, I haven't found any documentation that says Google deletes a users property services storage when a user

Calling Image File on Google App Scripts to Upload into GoogleDrive

假如想象 提交于 2021-02-11 16:50:37
问题 I am trying to set up a way to upload image files into a google drive. It will create a folder using a timeid and place the image inside the folder it created. I am having trouble calling out the image file. This is how I am attempting this, the folder gets created but no image. Please ignore any missing var for the timeid variable. This is working fine. Error given: ReferenceError: imgInp is not defined Thank you in advance for your help! Code.gs var day = d.getDate(); var month = d

Google Sheets Function to Actively Check Cell

心已入冬 提交于 2021-02-11 16:49:23
问题 I've a function I'm using that checks the cell of the color and returns Yes/No in another column. However, after applying the function, and then changing the color of the cell afterwards the function isn't applied anymore. For example the function is applied and returns "Yes", then if I change the color of the cell to white it doesn't return to "No". Is it possible to have the function to actively check the cell, or I just need to reapply the function each time the color of the cell changes?

Calling Image File on Google App Scripts to Upload into GoogleDrive

╄→尐↘猪︶ㄣ 提交于 2021-02-11 16:48:55
问题 I am trying to set up a way to upload image files into a google drive. It will create a folder using a timeid and place the image inside the folder it created. I am having trouble calling out the image file. This is how I am attempting this, the folder gets created but no image. Please ignore any missing var for the timeid variable. This is working fine. Error given: ReferenceError: imgInp is not defined Thank you in advance for your help! Code.gs var day = d.getDate(); var month = d

Google Sheets Function to Actively Check Cell

爷,独闯天下 提交于 2021-02-11 16:48:37
问题 I've a function I'm using that checks the cell of the color and returns Yes/No in another column. However, after applying the function, and then changing the color of the cell afterwards the function isn't applied anymore. For example the function is applied and returns "Yes", then if I change the color of the cell to white it doesn't return to "No". Is it possible to have the function to actively check the cell, or I just need to reapply the function each time the color of the cell changes?

Calling Image File on Google App Scripts to Upload into GoogleDrive

懵懂的女人 提交于 2021-02-11 16:48:09
问题 I am trying to set up a way to upload image files into a google drive. It will create a folder using a timeid and place the image inside the folder it created. I am having trouble calling out the image file. This is how I am attempting this, the folder gets created but no image. Please ignore any missing var for the timeid variable. This is working fine. Error given: ReferenceError: imgInp is not defined Thank you in advance for your help! Code.gs var day = d.getDate(); var month = d