google-apps-script

Address unavailable for UrlFetchApp.fetch in Google Apps Script

天涯浪子 提交于 2021-02-08 11:38:43
问题 First of all, many thanks to Google for the awesome Google Apps Script! I am currently designing a Google Sheets ad-on with a API service named CryptoCompare. So far it has always worked out quite well. But suddenly I get the error "Address unavailable". I tried different endpoints, new API keys and even new Google Sheets. But nothing works. This simple call fails: var response = UrlFetchApp.fetch('https://min-api.cryptocompare.com/data/blockchain/list'); Btw: Other APIs (such as Coinbase,

Time Trigger on Google Sheet Add On

我与影子孤独终老i 提交于 2021-02-08 11:24:04
问题 I have created a Google Apps Script and now want to publish it as a Google Sheet add on. The way script should work is to fetch some details from an API on daily basis (via the time trigger) and send notification to the installer if any new information is found in the data fetched via the API. When people install this add-on, I want it to run automatically for them everyday, and send them email when changes are found as above. Is this doable with google sheet add on? 回答1: Yes it is feasible,

Time Trigger on Google Sheet Add On

别说谁变了你拦得住时间么 提交于 2021-02-08 11:23:42
问题 I have created a Google Apps Script and now want to publish it as a Google Sheet add on. The way script should work is to fetch some details from an API on daily basis (via the time trigger) and send notification to the installer if any new information is found in the data fetched via the API. When people install this add-on, I want it to run automatically for them everyday, and send them email when changes are found as above. Is this doable with google sheet add on? 回答1: Yes it is feasible,

How to set first line of paragraph HEADING2 and rest normal text

烂漫一生 提交于 2021-02-08 11:21:59
问题 I'm using Google Apps Script to iterate through my contacts and print name, address, email and phone numbers to a document. I want the name in style "Heading 2" and the rest in style "Normal text". How can I do this? Here's what I've got so far but it makes the whole paragraph Heading 2, instead of just the name. var myContacts = ContactsApp.findContactGroup('Some group').getContacts(); for (i=0; i < myContacts.length; i++) { var fullName = myContacts[i].getFullName(); if (fullName == '')

“Internal error executing the custom function” in only one of many cells using the function

不问归期 提交于 2021-02-08 11:12:40
问题 I have a custom function in my sheet which returns the color code for the font color of an inputted cell. It has been working fine for a few months, but today, one out of 61 cells using the custom function return an error saying "Internal error executing custom formula". I do not understand why this problem would exist only in this cell (it is the 6th of 61 cells with the function) nor how to fix it. The custom function follows here: function FontColor(input) { var ss = SpreadsheetApp

“Internal error executing the custom function” in only one of many cells using the function

…衆ロ難τιáo~ 提交于 2021-02-08 11:01:01
问题 I have a custom function in my sheet which returns the color code for the font color of an inputted cell. It has been working fine for a few months, but today, one out of 61 cells using the custom function return an error saying "Internal error executing custom formula". I do not understand why this problem would exist only in this cell (it is the 6th of 61 cells with the function) nor how to fix it. The custom function follows here: function FontColor(input) { var ss = SpreadsheetApp

Google Apps Script: code to convert a text document in PDF?

巧了我就是萌 提交于 2021-02-08 11:00:44
问题 I'd like a snipe of code to convert a google docs text document template in a PDF file. I know how to create a new document as a google text document, but not how to transform it in a PDF file. I find this piece of code: var pdf = UrlFetchApp.fetch("https://spreadsheets.google.com/feeds/download/spreadsheets/Export?key="+key+"&exportFormat=pdf&gid=1&gridlines=0&printtitle=0&size=7&fzr=true&portrait=1&fitw=1", requestData).getBlob().setName(name); return pdf; But I don't need spreadsheet

Google Apps Script: code to convert a text document in PDF?

强颜欢笑 提交于 2021-02-08 11:00:35
问题 I'd like a snipe of code to convert a google docs text document template in a PDF file. I know how to create a new document as a google text document, but not how to transform it in a PDF file. I find this piece of code: var pdf = UrlFetchApp.fetch("https://spreadsheets.google.com/feeds/download/spreadsheets/Export?key="+key+"&exportFormat=pdf&gid=1&gridlines=0&printtitle=0&size=7&fzr=true&portrait=1&fitw=1", requestData).getBlob().setName(name); return pdf; But I don't need spreadsheet

Google Apps Script: code to convert a text document in PDF?

耗尽温柔 提交于 2021-02-08 11:00:30
问题 I'd like a snipe of code to convert a google docs text document template in a PDF file. I know how to create a new document as a google text document, but not how to transform it in a PDF file. I find this piece of code: var pdf = UrlFetchApp.fetch("https://spreadsheets.google.com/feeds/download/spreadsheets/Export?key="+key+"&exportFormat=pdf&gid=1&gridlines=0&printtitle=0&size=7&fzr=true&portrait=1&fitw=1", requestData).getBlob().setName(name); return pdf; But I don't need spreadsheet

Google Apps Script: Comparing Arrays for Unique Values

被刻印的时光 ゝ 提交于 2021-02-08 10:55:53
问题 I'm working from the solution provided HERE to compare two arrays. The example provided returns values found in both arrays to Array1 ( same ) and values only found on one or the other two Array2 ( diff ). ISSUE: When I apply it to my own script, valuesDATA returns nothing and valuesCheckSeeding returns ALL values from both arrays DESIRED RESULT: I have two arrays that I'd either like to create a third out of, or only select values from the first array, valuesDATA which are NOT present in the