google-sheets

Duplicate worksheet with copy placed next to original

笑着哭i 提交于 2021-02-11 18:19:29
问题 I have a script to duplicate a sheet in the same spreadsheet: function duplicateSheet() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var devis = ss.getActiveSheet(); devis.copyTo(ss).setName('CopyDevis'); It works fine, however the copy tab is created at the very right of the spreadsheet. It is a bit of an issue because i have many tabs and i would have to go to the far right then move it back to the left. I want the copy to created right next to the original. I'm aware of the

Duplicate worksheet with copy placed next to original

我的梦境 提交于 2021-02-11 18:18:21
问题 I have a script to duplicate a sheet in the same spreadsheet: function duplicateSheet() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var devis = ss.getActiveSheet(); devis.copyTo(ss).setName('CopyDevis'); It works fine, however the copy tab is created at the very right of the spreadsheet. It is a bit of an issue because i have many tabs and i would have to go to the far right then move it back to the left. I want the copy to created right next to the original. I'm aware of the

Custom Formula to look at a different GSheet

北城余情 提交于 2021-02-11 17:53:44
问题 I am still trying to wrap my head around using script, so my apologies if this is basic. I have a summary Spreadsheet that pulls values from hundreds of other documents. This used (too many) importrange formulas, but many of these are now #REF or ...Loading. I am trying to create a custom formula that will mimic the importrange function and return the values. I thought the hard part would be getting the formulas to update when another document was updated, but I have fallen right at the start

xpath to obtain texts between 2 tags in IMPORTXML formula

狂风中的少年 提交于 2021-02-11 17:01:36
问题 EDIT- I have changed xpaths. odds xpath and result xpath are exactly what I want. But the Race url and race num do not correspond to this data. I have found an xpath that returns the info that I need but it returns all data and I only need data between Australia and new zealand. I have 3 xpaths that I need refined. Sample URL: https://www.punters.com.au/form-guide/2020-02-06/ Race URL XPATH - //*[@class='component-wrapper form-guide-index']/table1/tbody/tr//td/a/@href Race Result XPATH - /

Google Sheets Function to Actively Check Cell

心已入冬 提交于 2021-02-11 16:49:23
问题 I've a function I'm using that checks the cell of the color and returns Yes/No in another column. However, after applying the function, and then changing the color of the cell afterwards the function isn't applied anymore. For example the function is applied and returns "Yes", then if I change the color of the cell to white it doesn't return to "No". Is it possible to have the function to actively check the cell, or I just need to reapply the function each time the color of the cell changes?

Google Sheets Function to Actively Check Cell

爷,独闯天下 提交于 2021-02-11 16:48:37
问题 I've a function I'm using that checks the cell of the color and returns Yes/No in another column. However, after applying the function, and then changing the color of the cell afterwards the function isn't applied anymore. For example the function is applied and returns "Yes", then if I change the color of the cell to white it doesn't return to "No". Is it possible to have the function to actively check the cell, or I just need to reapply the function each time the color of the cell changes?

How to set cell value from google sheet as default value of textarea for HTML sidebar?

这一生的挚爱 提交于 2021-02-11 16:46:50
问题 I have a standalone Google script using as library. This library contains HTML form using like sidebar with one <textarea> element and scripts. I want to get some value from a cell of active google spreadsheet to set it as default value of <textarea> element in the sidebar. And then update it with manually typing text and send it as new value to the source cell keeping sidebar is open. Library's scripts function showSidebar() { var html = HtmlService.createHtmlOutputFromFile('method.html')

How to set cell value from google sheet as default value of textarea for HTML sidebar?

落爺英雄遲暮 提交于 2021-02-11 16:46:47
问题 I have a standalone Google script using as library. This library contains HTML form using like sidebar with one <textarea> element and scripts. I want to get some value from a cell of active google spreadsheet to set it as default value of <textarea> element in the sidebar. And then update it with manually typing text and send it as new value to the source cell keeping sidebar is open. Library's scripts function showSidebar() { var html = HtmlService.createHtmlOutputFromFile('method.html')

OnEdit need to send emails from a column

送分小仙女□ 提交于 2021-02-11 15:58:08
问题 When in column O cell is mentioned "Shipped" I want to send emails in column C (with corresponding row) Need support to get this script right function sendEmail(e) { var thisSheet = e.source.getActiveSheet(); if (thisSheet.getName() !== 'CRM' || e.range.columnStart !== 15 || e.range.rowStart == 1 || e.value !== 'Shipped') return; var body, headers = thisSheet.getRange(1, 1, 1, 6) .getValues()[0], thisRow = thisSheet.getRange(e.range.rowStart, 1, 1, 6) .getValues()[0], recipientsEMail =

Button change text display every after click

末鹿安然 提交于 2021-02-11 15:57:43
问题 I am new in Google script. Could you please help me on this. I want to create a button in googlesheet with series of text display every after click. ( I dont know what to put in script) OPEN (green background) --> CLICK--> CLOSE ( red background) --> CLICK--> OPEN (green background)...and so on Thank you in advance 回答1: I believe your goal as follows. You want to achieve the button which is changed when the button is clicked on the Google Spreadsheet. For example, when the button with the