google-apps-script

How to force the gmail inbox to reload/refresh?

不打扰是莪最后的温柔 提交于 2021-01-01 06:28:53
问题 I have built an application that uses the import endpoint in the Gmail API Gmail.Users.Messages.import() to clone an email message but allow for subject changing. It then deletes the original/old message using the remove endpoint Gmail.Users.Messages.remove() I would like a way to refresh the Gmail inbox UI or even to just reload the web page from Google Apps Script - however, I'm not aware of how to do this - and a look around the internet hasn't proven especially helpful. 回答1: Unfortunately

Unmerge spreadsheet cells and fill ex-merged empty cells with data

﹥>﹥吖頭↗ 提交于 2021-01-01 06:25:47
问题 breakApart() works fine, but I'd like to fill the empty cells with merged cell's data. var sheet = SpreadsheetApp.getActiveSheet(); var sheetRange = sheet.getRange(1, 1, sheet.getMaxRows(), sheet.getMaxColumns()); sheetRange.breakApart(); I got the value I need, but how can I get the cells to fill? var value = (cell.isPartOfMerge() ? cell.getMergedRanges()[0].getCell(1,1) : cell).getValue(); 回答1: If you already have the value, You can setValue() the desired value over the entire range and all

Unmerge spreadsheet cells and fill ex-merged empty cells with data

送分小仙女□ 提交于 2021-01-01 06:24:51
问题 breakApart() works fine, but I'd like to fill the empty cells with merged cell's data. var sheet = SpreadsheetApp.getActiveSheet(); var sheetRange = sheet.getRange(1, 1, sheet.getMaxRows(), sheet.getMaxColumns()); sheetRange.breakApart(); I got the value I need, but how can I get the cells to fill? var value = (cell.isPartOfMerge() ? cell.getMergedRanges()[0].getCell(1,1) : cell).getValue(); 回答1: If you already have the value, You can setValue() the desired value over the entire range and all

How to restrict copy/download/print access for a file using Google apps script

一笑奈何 提交于 2021-01-01 04:08:15
问题 has anyone found a way to restrict copy/download/print access for a spreadsheet using google apps script? Background info: I created a script which restricts share rights for editors using setShareableByEditors(false). The only problem is that editors can still easily make a copy of the spreadsheet and then share it widely. I know that there's an option to manually restrict this setting in Google Sheets, but this solution is not scalable as I'm trying to manage share settings for a high

How to restrict copy/download/print access for a file using Google apps script

混江龙づ霸主 提交于 2021-01-01 04:02:36
问题 has anyone found a way to restrict copy/download/print access for a spreadsheet using google apps script? Background info: I created a script which restricts share rights for editors using setShareableByEditors(false). The only problem is that editors can still easily make a copy of the spreadsheet and then share it widely. I know that there's an option to manually restrict this setting in Google Sheets, but this solution is not scalable as I'm trying to manage share settings for a high

How to restrict copy/download/print access for a file using Google apps script

↘锁芯ラ 提交于 2021-01-01 04:01:40
问题 has anyone found a way to restrict copy/download/print access for a spreadsheet using google apps script? Background info: I created a script which restricts share rights for editors using setShareableByEditors(false). The only problem is that editors can still easily make a copy of the spreadsheet and then share it widely. I know that there's an option to manually restrict this setting in Google Sheets, but this solution is not scalable as I'm trying to manage share settings for a high

Enable Google API OAuth Scope

孤街醉人 提交于 2021-01-01 03:58:08
问题 For one of the application created using Google Apps Script, some scopes are automatically added as follows in my app: https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/script.external_request https://www.googleapis.com/auth/script.send_mail https://www.googleapis.com/auth/spreadsheets I've followed all the steps for OAuth Client Verification according to this documentation. But still, my verification process is pending and support team said that I need to add https://www

Enable Google API OAuth Scope

[亡魂溺海] 提交于 2021-01-01 03:49:11
问题 For one of the application created using Google Apps Script, some scopes are automatically added as follows in my app: https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/script.external_request https://www.googleapis.com/auth/script.send_mail https://www.googleapis.com/auth/spreadsheets I've followed all the steps for OAuth Client Verification according to this documentation. But still, my verification process is pending and support team said that I need to add https://www

Apps Script - Modal show and google.script.run from bounded to library

跟風遠走 提交于 2020-12-30 03:41:08
问题 I have a Spreadsheet file with a bounded script which integrates a Library. This library provides 2 functions: Show an html modal with a button Provides the function callback when the button on the html is clicked LIBRARY content: test.html <!DOCTYPE html> <html> <head> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"> </head> <body> <a class=

Apps Script - Modal show and google.script.run from bounded to library

…衆ロ難τιáo~ 提交于 2020-12-30 03:40:26
问题 I have a Spreadsheet file with a bounded script which integrates a Library. This library provides 2 functions: Show an html modal with a button Provides the function callback when the button on the html is clicked LIBRARY content: test.html <!DOCTYPE html> <html> <head> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"> </head> <body> <a class=