google-sheets

How can I collect all of the data on a Google spreadsheet and then clear it after the script has been run?

为君一笑 提交于 2021-02-05 09:36:19
问题 I am creating a script that will grab all unread e-mails, move the bodies of these e-mails into a Google spreadsheet, push all of this data through to Slack via webhook, then clear the sheet. The first part of the script that grabs the unread e-mails and puts it in the appropriate cells is working fine. The part where it is pushing the data through is not working. I have it set to a loop to make sure that it grabs all of the data, but it is not working. I have tried to make it not show up as

Delete row in google spreadsheet from a specific range based on values from another specific cell range

泄露秘密 提交于 2021-02-05 09:30:23
问题 I need a little help with my script. First, here is a link to the ss: https://docs.google.com/spreadsheets/d/1TgG64irjoxkV9wKlT5bEnaNEWlGyOlNxVoLxOmQZ2BA/edit?usp=sharing I want to delete rows from sheet "Team 1" (range: A15:A41), based on values from sheet "Overview" (range: C4:C12). Basically, if any value from C4:C12 is found in A15:A41, the row where is found should be deleted. Ex. for my ss: C4 = 3, that means in sheet "Team 1", row 17 should be deleted. My script so far: function

Delete row in google spreadsheet from a specific range based on values from another specific cell range

两盒软妹~` 提交于 2021-02-05 09:29:58
问题 I need a little help with my script. First, here is a link to the ss: https://docs.google.com/spreadsheets/d/1TgG64irjoxkV9wKlT5bEnaNEWlGyOlNxVoLxOmQZ2BA/edit?usp=sharing I want to delete rows from sheet "Team 1" (range: A15:A41), based on values from sheet "Overview" (range: C4:C12). Basically, if any value from C4:C12 is found in A15:A41, the row where is found should be deleted. Ex. for my ss: C4 = 3, that means in sheet "Team 1", row 17 should be deleted. My script so far: function

Google AppScript syntax error for sendemail. Can't ID my problem

好久不见. 提交于 2021-02-05 09:27:29
问题 I am trying to get Google sheets to send personalized emails from long list on another sheet in the workbook. I used a tutorial (as I am a certified novice at all coding languages) but the AppScript is telling me that line 4 has a syntax error. I cannot for the life of me figure out what I've done wrong, but I'm sure that its blatantly obvious when explained by someone with these legitimate skills. Here is the script: function sendEmail() { var ss = SpreadsheetApp.getActiveSpreadsheet() var

Using onEdit trigger, is there a way to make sure the last row in a Sheet is visible to users?

橙三吉。 提交于 2021-02-05 09:25:09
问题 I have a Google Sheet that accumulates up to 100 entries per day. As users add new entries, the script puts new data into the last row (see snippet below). However, there are only 12 rows visible on the screen, so once those are filled, the user can't see new entries. How can I make the last row visible to the user each time data is entered? I am new to google-apps-script, so thanks for any ideas. I believe onEdit trigger no longer works with sheet.setActiveRange() , so I am looking for a

Find position of a cell containing a specific string

六月ゝ 毕业季﹏ 提交于 2021-02-05 08:54:05
问题 I'm looking for a way to search for a string in a range and get the position of the cell once found. Here's what I use to find the row number var ss = SpreadsheetApp.getActiveSheet(); var values = ss.getRange("B:B").getValues(); var i=rownum=0; for(i=0;i<values.length;i++) { if(values[i]=='string') rownum=i+1; I then use the following code to find the column number var colvalue; for (j=1;j<ss.getLastColumn();j++) { if (ss.getRange(3,j).getValue() == "string" { colvlaue = j; } } Is there a way

“The coordinates of the range are outside the dimensions of the sheet” error when sorting

て烟熏妆下的殇ゞ 提交于 2021-02-05 08:48:06
问题 I am trying to create a script to sort a table on the current active sheet/tab but I am getting an error that I could not identify. I keep getting The coordinates of the range are outside the dimensions of the sheet. . My table has data in them from columnA to columnQ. Data in columnA are identification numbers and columnB to columnQ contain formulas. What am I doing wrong with my script? var sortFirst = 7; //index of column to be sorted by; 1 = column A, 2 = column B, etc. var sortFirstAsc =

Is it possible to change Google sheet sidebar heading background color?

泪湿孤枕 提交于 2021-02-05 08:41:12
问题 I want to change Google sheet sidebar heading background color. Have any idea to change background color using app script or any manual setting. Please help. 回答1: This is probably impossible. The title bar is outside of the iFrame. If there was a way to set this it would be documented in https://developers.google.com/apps-script/reference/html/html-output like the .setTitle() method. However, I see no methods to help in this situation. The best you can get is a titleless bar. 来源: https:/

Showing errors while creating Google Maps URL from a Sheets using App Scripts?

吃可爱长大的小学妹 提交于 2021-02-05 08:40:53
问题 I have latitude and longitude values in a Google Sheet and I want to draw a Google Map URL using App Scripts. I have a paid Google Maps API key but can't find ways to integrate it with my App Scripts code in the Script Editor? While executing the codes, it shows error message, "The Google Maps Platform server rejected your request. You must use an API key to authenticate each request to Google Maps Platform APIs. For additional information, please refer to http://g.co/dev/maps-no-account" The

Showing errors while creating Google Maps URL from a Sheets using App Scripts?

喜夏-厌秋 提交于 2021-02-05 08:38:46
问题 I have latitude and longitude values in a Google Sheet and I want to draw a Google Map URL using App Scripts. I have a paid Google Maps API key but can't find ways to integrate it with my App Scripts code in the Script Editor? While executing the codes, it shows error message, "The Google Maps Platform server rejected your request. You must use an API key to authenticate each request to Google Maps Platform APIs. For additional information, please refer to http://g.co/dev/maps-no-account" The