google-sheets

Save a sheet as pdf with onEdit()

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-10 16:18:31
问题 i'm trying to save a google spreadsheet as pdf and mail it to myself everytime, when a specific cell in the spreadsheet is edited. I have the script which saves the spreadsheet as pdf and emails it and it works and I also have an onEdit(e) script which does exactly what I want. But when I put them together it doesn't work. Here's the script: function onEdit(e) { var sheet1 = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("booking"); var index = sheet1.getRange('O5').getValue(); if(index

how to make a custom function NOT recalculate in Google Sheet

最后都变了- 提交于 2021-02-10 15:43:45
问题 I find that each time i log in. The heavy functions I have do recalculate. IN particular it is functions including UrlFetch that recalculate and make 100s of calls to the url when I log in. I would rather just rely on the data I drew last time. Is there a way to block (haphazard) recalculation? 回答1: Thanks for Ruben's help: Function recalculation cannot be disabled. the workarounds are (1.) to make a "switch" input to the function, which while in "don't update state" would make the function

Specify the table to import via IMPORTHTML/IMPORTXML according to its title name

与世无争的帅哥 提交于 2021-02-10 14:35:22
问题 The tables change position and I need to specify which one to import according to their title, for example, the table below has the title Over/Under 2.5 soccer predictions Site : https://www.soccerstats247.com/predictions/brazil/serie-a/ Unsuccessful attempts : 1 - I tried to use IMPORTXML by specifying the table id, but the import results in all the data in one column, it does not import as a table: =IMPORTXML("https://www.soccerstats247.com/predictions/brazil/serie-a/", "//table[@id=

How can I check if a certain ticket # is present in a column?

倖福魔咒の 提交于 2021-02-10 14:32:18
问题 I am trying to create a spreadsheet that shows if certain shipments of parts have arrived yet, but I am stuck on the IF Statement. Basically, I want it to check if a certain ticket number is present in the column as each ticket has a unique ID. My current code: =IF(REGEXMATCH(E2, 'Shipment Inventory Responses'!D:D), "Yes", "No") I want it do check if the data in 1 cell on the current sheet is present in the D column of another sheet. However, The sheet is empty and it is outputting "Yes".

Split Google Sheets Query results from one row into two

半城伤御伤魂 提交于 2021-02-10 14:30:55
问题 I want to take my QUERY results and move one cell (H [description]) to the following row of each result. I found this answer, which is very close, but the format of the table is different, so I'm not sure how to apply it to my scenario. This is the basic idea: Category | Sub-Category | Item | Description Fruit | Citrus | Orange | It's orange Fruit | Melon | Cantaloupe | Round Into Category | Sub-Category | Item Fruit | Citrus | Orange It's orange Fruit | Melon | Cantaloupe Round 回答1:

How can I check if a certain ticket # is present in a column?

十年热恋 提交于 2021-02-10 14:30:48
问题 I am trying to create a spreadsheet that shows if certain shipments of parts have arrived yet, but I am stuck on the IF Statement. Basically, I want it to check if a certain ticket number is present in the column as each ticket has a unique ID. My current code: =IF(REGEXMATCH(E2, 'Shipment Inventory Responses'!D:D), "Yes", "No") I want it do check if the data in 1 cell on the current sheet is present in the D column of another sheet. However, The sheet is empty and it is outputting "Yes".

Session.getActiveUser.getEmail() blank? Google sheets

旧城冷巷雨未停 提交于 2021-02-10 14:23:22
问题 I want to check the user who is clicking that specific button. When I click on while signed in as my account it runs fine. but if anyone else runs it, it is blank. How can I get the logged user email id? This is my code: function check_User(){ var ui = SpreadsheetApp.getUi(); var usr = Session.getActiveUser().getEmail(); ss.toast(usr); if( usr == "abc@gmail.com" || usr =="myemail@gmail.com"){ return true; } else{ ui.alert("Not authorized"); return false; } } 回答1: See getActiveUser() method

How to get filtered sheet cells values with pyghseets

馋奶兔 提交于 2021-02-10 14:16:33
问题 How can I get only filtered values from spreadsheet? If user have filtered some values, I don't need them. 回答1: You want to retrieve the values from the filtered sheet. The filter is the basic filter. For example, when the values are put in the cells "A1:J25" and the values of "A4:J4" and "A11:J11" are shown by the filter, you want to retrieve the values of cells of "A4:J4" and "A11:J11". You want to achieve this using pygsheets. You have already been able to get and put values for Google

How to get filtered sheet cells values with pyghseets

北城以北 提交于 2021-02-10 14:15:51
问题 How can I get only filtered values from spreadsheet? If user have filtered some values, I don't need them. 回答1: You want to retrieve the values from the filtered sheet. The filter is the basic filter. For example, when the values are put in the cells "A1:J25" and the values of "A4:J4" and "A11:J11" are shown by the filter, you want to retrieve the values of cells of "A4:J4" and "A11:J11". You want to achieve this using pygsheets. You have already been able to get and put values for Google

google sheets onedit specific cell

依然范特西╮ 提交于 2021-02-10 11:27:45
问题 In google sheets, I'm looking to have data copied from one sheet to another after editing a particular cell in the sheet being copied. I have code that does what I want except for only being trigger by the particular cell. Can anyone tell me what I'm missing? function OnEdit(e) { var ss = SpreadsheetApp.getActiveSpreadsheet(); var destination = SpreadsheetApp.openById("1P6gj2UwfRmSMYZ4LBovvqbqy88aluOysPqWWhWbw_VE") var source_sheet = ss.getSheetByName("Submit"); var destination_sheet =