google-apps-script

Google script to copy sheet in spreadsheet to new spreadsheet and name new spreadsheet after specific cell

六眼飞鱼酱① 提交于 2021-02-19 16:35:05
问题 I have a google spreadsheet with multiple sheets within it, I would like to copy each individual sheet into a new spreadsheet and to have the new spreadsheet named after text in a specific cell. I am happy to run the script multiple times so I figured to have it copy the active sheet. i.e. What I have = Spreadsheet called "Colours" - Sheet 1="red", Sheet 2= "blue", Sheet 3= "yellow", etc. What I want = Spreadsheet called "Red". Spreadsheet called "blue", Spreadsheet called "yellow" So far I

Google Apps Script - Changing label of individual email in Gmail

我是研究僧i 提交于 2021-02-19 15:53:33
问题 I want to change the label of an individual email programatically in gmail in a Google Script. I can't use the standard GmailApp service because it applies actions to the whole thread instead of an individual email. I've found a few examples of this being done with the Advanced Gmail API (Search/replace labels in specific messages (not the whole thread) with Google Apps Script). But I've not had success with this. I keep getting the following error: Invalid number of arguments provided.

Apps Script Drive App Service - Create a file of Google Type - Mime Type

蹲街弑〆低调 提交于 2021-02-19 07:57:17
问题 I'm using the .createFile method of the DriveApp Folder class. This is the syntax: createFile(name, content, mimeType) The documentation is here: createFile Google DriveApp Service The example shows a mimeType setting of MimeType.HTML. // Create an HTML file with the content "Hello, world!" DriveApp.createFile('New HTML File', '<b>Hello, world!</b>', MimeType.HTML); I can type in MimeType. and get a list of MimeTypes, one of them being GOOGLE_DOCS . So I entered MimeType.GOOGLE_DOCS . But I'm

Is it possible to capture the selected portion of text within a Spreadsheet cell with Google Apps Script?

允我心安 提交于 2021-02-19 07:11:10
问题 Is it possible to get the selected text in a cell as shown below. I think the answer is no and I can't find any commands related to selections of this type in Google Apps Script for spreadsheets. We can select ranges of cells but I can't find any Google Apps Script commands that deal with selections within the cell even though it is possible to make these selections via menu commands and even make changes like text style and text color to partial selections of cell text. It is interesting to

Is it possible to capture the selected portion of text within a Spreadsheet cell with Google Apps Script?

倾然丶 夕夏残阳落幕 提交于 2021-02-19 07:09:49
问题 Is it possible to get the selected text in a cell as shown below. I think the answer is no and I can't find any commands related to selections of this type in Google Apps Script for spreadsheets. We can select ranges of cells but I can't find any Google Apps Script commands that deal with selections within the cell even though it is possible to make these selections via menu commands and even make changes like text style and text color to partial selections of cell text. It is interesting to

Is it possible to capture the selected portion of text within a Spreadsheet cell with Google Apps Script?

偶尔善良 提交于 2021-02-19 07:08:58
问题 Is it possible to get the selected text in a cell as shown below. I think the answer is no and I can't find any commands related to selections of this type in Google Apps Script for spreadsheets. We can select ranges of cells but I can't find any Google Apps Script commands that deal with selections within the cell even though it is possible to make these selections via menu commands and even make changes like text style and text color to partial selections of cell text. It is interesting to

Trigger Google Apps Script in Spreedsheet from context menu

眉间皱痕 提交于 2021-02-19 06:13:38
问题 I have Google Apps Script in Spreedsheet that works on currently selected row. To run it I have to select this script from script manager. Is it possible to add this script to the context menu or bind to some shourtcut ? 回答1: You can create a menu with button that will run the script that you want using the onOpen function. See the Apps Script documentation. function onOpen() { var sheet = SpreadsheetApp.getActiveSpreadsheet(); var entries = [{ name : "Read Data", functionName : "readRows" }]

how to lock content of a dynamically generated cell with another cell

三世轮回 提交于 2021-02-19 06:11:53
问题 background I like to use story mapping to gather requirements from clients (and to create estimates for them) using cardboardit.com. I'm currently making a sample estimate for a project that I have completed in the past (http://vibereel.com/). Cardboardit offers the ability to dump data into a csv file, which can been in raw form in the data tab in this sheet The data tab is pretty raw, so i used this formula to make it look nicer in the estimate tab: =QUERY(data!A2:J,"select C,E,D where A=

how to lock content of a dynamically generated cell with another cell

≯℡__Kan透↙ 提交于 2021-02-19 06:10:29
问题 background I like to use story mapping to gather requirements from clients (and to create estimates for them) using cardboardit.com. I'm currently making a sample estimate for a project that I have completed in the past (http://vibereel.com/). Cardboardit offers the ability to dump data into a csv file, which can been in raw form in the data tab in this sheet The data tab is pretty raw, so i used this formula to make it look nicer in the estimate tab: =QUERY(data!A2:J,"select C,E,D where A=

Insert Emoji unicode from google sheets to an email using script editor

我怕爱的太早我们不能终老 提交于 2021-02-19 06:05:36
问题 I'm trying to get some text out of google sheets using the script editor to send an email. The text contains an emoji unicode, however, when the email is sent it prints the plain text instead of displaying the unicode emoji.\ What I'm seeing in the email: &#9889 some text here &#9889 What I'd like to see in the email: '⚡ some text here ⚡' The text I have saved within google sheets: ⚡ some text here ⚡ The script I use to get the text out of google sheets. var emailText = myTemplate.getRange(x,