google-sheets

How do I attach a working pdf of my google sheet to a draft email?

对着背影说爱祢 提交于 2021-01-29 20:40:38
问题 I have a script that was put together to open, rename, and export a google sheet as a pdf. Then that sheet would be added to an email draft. I have been using this script for two years without issue, but for some reason, the pdf attachment will no longer open. The error message I get is "Adobe Acrobat Reader could not open [File Name.pdf] because it is either not a supported file type or because the file has been damaged." I go directly to the google sheet and export as a pdf manually, I can

Import csv data into google sheets using apps script

隐身守侯 提交于 2021-01-29 20:37:38
问题 I would like to import a csv file into Google Sheets using Apps Script. I would like to add the csv file to be read to the existing tab "csv_data" after the last line. Can someone help me? I am a starting apps script user. Thank you in advance for your help! GJM 回答1: There is a useful method, called Utilities.parseCsv() If your csv file is located on your Google drive, you can import and append it e.g. by attaching to your spreadsheet a bound script with the following content: function

Triggering a cloud function from google sheets (via google apps script)

被刻印的时光 ゝ 提交于 2021-01-29 19:58:18
问题 I have been trying (with little success) to have a google cloud function be triggered via an http request from a google sheet (google apps script) and it seemingly won't work. A few important things: The function should only run if the user comes from my organization The user should not have to be invited to the GCP project I know this can be done very easily in google colabs and Python. The following script will let a user in my organization who is not in the GCP project trigger the cloud

Google Sheet - How to FULL OUTER JOIN with one table?

馋奶兔 提交于 2021-01-29 19:51:05
问题 I would like to create a tables for my tournament. I create a table with some players and their leagues. I would like to generate matchmaking table, by league, like that I'm to weak with google spreadsheet to do that. I understood I can't use "JOIN" with "QUERY()" function. It seems I need to use "ArrayFormula()" and "VLOOKUP()" functions but after hours pasted to try, I failed. If anyone of you can help me, it will be so great ! Here is a googlesheet with datas : https://docs.google.com

Saving Sheet to PDF

假装没事ソ 提交于 2021-01-29 19:08:34
问题 Hi all I'm relatively new to scripting. I have some code to convert a google sheet to pdf and email out as an attachment however I am struggling with setting the PDF output page setup. The margins are to big. /* Email Google Spreadsheet as PDF */ function emailGoogleSpreadsheetAsPDF() { // Send the PDF of the spreadsheet to this email address var email = "dav..........n@.....a.com"; // Get the currently active spreadsheet URL (link) var ss = SpreadsheetApp.getActiveSpreadsheet(); // Subject

Value tallying code dysfunctions when put into discord command

偶尔善良 提交于 2021-01-29 19:08:19
问题 I just coded my bot and basically it sums every user's daily guild XP from the last seven days and prints it in a list into a google sheet. There is one problem and it is that the guild XP values in the list are wrong when manually adding up, which is the guild XP from all seven days from the API JSON. The names it prints are right, but the values are wrong, and I can't tell exactly how they are. This only happens when the code below is run in a discord command, but the code functions

ImportXML not producing correct values

吃可爱长大的小学妹 提交于 2021-01-29 19:01:34
问题 I am following the following tutorial to import stock options data into a Google sheet. https://www.youtube.com/watch?v=Be7z9YeeVY0&ab_channel=daneshj The following formula will import data from yahoo finance into the sheet: =iferror(TRANSPOSE(IMPORTXML(CONCATENATE("https://finance.yahoo.com/quote/",A2,"?p=",A2),"//tr")),"You have to add a contract name in column A") At first glance, everything looks fine, as it seems to be pulling data back from the webpage; however, all the values are

Is there a dynamic way of accessing ranges from multiple tabs?

丶灬走出姿态 提交于 2021-01-29 18:44:35
问题 My Google Sheets document contains 4 tabs: June2019, July2019, August2019, and Master. In the Master tab, I collect the data from all monthly tabs, which all have the same layout. In the Master tab, I have functions such as: =SUM(June2019!Profits, July2019!Profits, August2019!Profits) or =COUNTA(QUERY({June2019!A3:C;July2019!A3:C;August2019!A3:C},"select Col2 where Col2 = 'L' and Col3 = 'P'")) As the year progresses and I add more monthly tabs to my Google Sheets document, I don't want to

Autocopy cell value from one cell to another sheet by clicking an icon in google sheets

社会主义新天地 提交于 2021-01-29 17:40:00
问题 I would like to copy cell value from cell A2 to a new spreadsheet by clicking on an icon in C2. Preferable I would like to add a timestamp to my new spreadsheet when someone clicks on C2. Could someone help me out with this matter? I have made a test spreadsheet here: https://docs.google.com/spreadsheets/d/1SUqqwr2fGZTDFMyCw9WRWUljSoHUO05X_a0arqLPUdo/edit#gid=0 The icon should be clickable by an anonymous user not only by the editor of the sheet. Any help is much appreciated 回答1: I posted the

google spreadsheet add custom menu to list sheets

孤人 提交于 2021-01-29 16:52:24
问题 I have a google spreadsheet which contains a lot of sheets. It's uncomfortable to go to a sheet that I want. So I want to make a custom menu that list my sheets. Is there an easy way to make this? (using google apps script..?) 回答1: I believe your goal as follows. You want to move the sheet by selecting the sheet at the custom menu on Google Spreadsheet. For this, how about this answer? In this answer, I would like to propose a sample script for achieving your goal by modifying this answer.