google-apps-script

Insert linked table from Google Sheets into Google Docs using Apps Script

北战南征 提交于 2020-12-12 17:55:12
问题 I'd like to use Google Apps Script to do insert a linked table from Google Sheets into a Google Document. I'm aware that this is easily done manually using Copy > Paste > Link to Spreadsheet . But is there a way to do this programmatically using Apps Script? 来源: https://stackoverflow.com/questions/51854637/insert-linked-table-from-google-sheets-into-google-docs-using-apps-script

Insert linked table from Google Sheets into Google Docs using Apps Script

℡╲_俬逩灬. 提交于 2020-12-12 17:51:31
问题 I'd like to use Google Apps Script to do insert a linked table from Google Sheets into a Google Document. I'm aware that this is easily done manually using Copy > Paste > Link to Spreadsheet . But is there a way to do this programmatically using Apps Script? 来源: https://stackoverflow.com/questions/51854637/insert-linked-table-from-google-sheets-into-google-docs-using-apps-script

Insert linked table from Google Sheets into Google Docs using Apps Script

痞子三分冷 提交于 2020-12-12 17:51:28
问题 I'd like to use Google Apps Script to do insert a linked table from Google Sheets into a Google Document. I'm aware that this is easily done manually using Copy > Paste > Link to Spreadsheet . But is there a way to do this programmatically using Apps Script? 来源: https://stackoverflow.com/questions/51854637/insert-linked-table-from-google-sheets-into-google-docs-using-apps-script

Insert linked table from Google Sheets into Google Docs using Apps Script

旧街凉风 提交于 2020-12-12 17:51:03
问题 I'd like to use Google Apps Script to do insert a linked table from Google Sheets into a Google Document. I'm aware that this is easily done manually using Copy > Paste > Link to Spreadsheet . But is there a way to do this programmatically using Apps Script? 来源: https://stackoverflow.com/questions/51854637/insert-linked-table-from-google-sheets-into-google-docs-using-apps-script

Easiest way to wait for google server-side function to resolve

生来就可爱ヽ(ⅴ<●) 提交于 2020-12-12 11:31:07
问题 I need the client side code to wait for the called server side (google.script.run) function to complete before running any more code. The withSuccessHandler(successFunc) does not cause lines of code that are after the server call to wait. What I've done: async function func(){ await google.script.run.withSuccessHandler(myFunc).serverFunc(); console.log("done"); } func(); How can the code wait to execute the console.log line until after the server side function resolves? 回答1: How about this

Easiest way to wait for google server-side function to resolve

依然范特西╮ 提交于 2020-12-12 11:30:31
问题 I need the client side code to wait for the called server side (google.script.run) function to complete before running any more code. The withSuccessHandler(successFunc) does not cause lines of code that are after the server call to wait. What I've done: async function func(){ await google.script.run.withSuccessHandler(myFunc).serverFunc(); console.log("done"); } func(); How can the code wait to execute the console.log line until after the server side function resolves? 回答1: How about this

“Shared Drive” support in Google Apps Script

我怕爱的太早我们不能终老 提交于 2020-12-12 06:21:20
问题 I am writing a JavaScript tool in Google Apps Script to check some properties of documents, like "are all links valid", "are permissions set correctly", and so on. I am using the API documented in https://developers.google.com/apps-script/reference/drive/drive-app to look up files by ID, check their permissions, locate them in Google Drive etc., but I found that "Shared Drives" don't work very nicely with that API. For example, for the root folder of a Shared Drive, Folder.getName() only

Converting a google doc to a pdf results in blank pdf, google scripts

孤者浪人 提交于 2020-12-12 03:47:44
问题 Here is my code to create a google doc paste some information in (eventually from a spreadsheet), convert it to a pdf and email it to myself. Unfortunately, while the document in drive has the 'This document was created by Google Apps Script.' comment in it, The pdf in the email does not. It has the right title but the content of the page is lost. I have tried several examples on stack overflow and have not got one so far to work. var ss = SpreadsheetApp.getActive(); function onOpen(){ var ui

Google sheets: Class google.script.run not working

喜欢而已 提交于 2020-12-10 11:55:45
问题 My problem is simple. All the possible solutions I searched for online did not address my question. Google's developer website for Class google.script.run (https://developers.google.com/apps-script/guides/html/reference/run#withSuccessHandler) showcased the method myFunction(...) (any server-side function). I have copied their exact code and html code and deduced that the function doSomething() does not execute. Nothing gets logged. I intend to use this to execute an HTML file so that I could

Google sheets: Class google.script.run not working

天涯浪子 提交于 2020-12-10 11:55:25
问题 My problem is simple. All the possible solutions I searched for online did not address my question. Google's developer website for Class google.script.run (https://developers.google.com/apps-script/guides/html/reference/run#withSuccessHandler) showcased the method myFunction(...) (any server-side function). I have copied their exact code and html code and deduced that the function doSomething() does not execute. Nothing gets logged. I intend to use this to execute an HTML file so that I could