google-apps-script-editor

How to stop code from moving two rows at a time when checkbox is true?

与世无争的帅哥 提交于 2020-01-17 14:05:07
问题 I'm working on a spreadsheet for my boss and I've been trying to add a feature where the entire row moves from Sheet1 to Sheet2 when the checkbox in column1 is checked. The code I'm using works, except sometimes it moves two rows at once even though only one box is checked. Here's my code: function onEdit(event) { // assumes source data in sheet named Sheet1 // target sheet of move to named Sheet2 // test column with yes/no is col 1 or A var ss = SpreadsheetApp.getActiveSpreadsheet(); var s =

Can't switch google cloud project on GAS Editor

Deadly 提交于 2020-01-06 02:40:06
问题 I am not able to switch google cloud platform project in GAS editor. What I am doing is… Open the google sheet GAS editor Open Resource --> Cloud Platform Project Enter project number that I want to connect With the process above, I was able to switch a cloud platform project but now it returns an error ‘Project does not exist, or you need edit access to it.’ I am using the same cloud project and same account(editor) that I used before and properly worked. I tried do the same with a owner

Google apps script editor's content assist is great, but buggy. Tips n' Tricks? Is this right forum for this?

梦想与她 提交于 2020-01-03 04:35:12
问题 Is this right place for google script editor questions? Hope so. Content assist is great, but stops working at times for me. Sometimes fix is to cut/paste all my code in/out of a desktop text editor, and back into google script editor. Perhaps this cleans out hidden chars, tags, etc., or perhaps it resets content assist. Dunno. But, works somewhat. Any thoughts? Tips? Trick? Too, here's great crash course on google script editor from the developers. Well worth a the watch: Crash Course Apps

Google Apps Script; Docs; convert selected element to HTML

爷,独闯天下 提交于 2019-12-30 11:25:07
问题 I am just starting with Google Apps Script and following the Add-on quickstart https://developers.google.com/apps-script/quickstart/docs In the quickstart you can create a simple add-on to get a selection from a document and translate it with the LanguageApp service. The example gets the underlying text using this: function getSelectedText() { var selection = DocumentApp.getActiveDocument().getSelection(); if (selection) { var text = []; var elements = selection.getSelectedElements(); for

Why does google script editor stop paren matching after 100 lines in a function and does it affect the code?

走远了吗. 提交于 2019-12-30 10:14:12
问题 in google script editor function foo(){ . . . // more than 100 lines . . } clicking on { or } highlights both in red with less than 100 lines both are green. Does it affect the code or is it just there to confuse us. 回答1: I've tried this myself, and reproduced your results, using Chrome on Windows Vista. The paren matching went Red with exactly 100 blank lines between the opening and closing braces. Steps to try, for the non-believers: In Drive / Docs, create a new script for a blank project.

Why does google script editor stop paren matching after 100 lines in a function and does it affect the code?

血红的双手。 提交于 2019-12-30 10:14:09
问题 in google script editor function foo(){ . . . // more than 100 lines . . } clicking on { or } highlights both in red with less than 100 lines both are green. Does it affect the code or is it just there to confuse us. 回答1: I've tried this myself, and reproduced your results, using Chrome on Windows Vista. The paren matching went Red with exactly 100 blank lines between the opening and closing braces. Steps to try, for the non-believers: In Drive / Docs, create a new script for a blank project.

Where can we find non-documented attributes of Google Objects

时间秒杀一切 提交于 2019-12-24 10:21:04
问题 I know that auto-completion sometimes helps you find unreferenced methods of Google objects such as for the Sheets API v4 but how can I find the attributes. example with spreadsheets: function onEdit(e) { Logger.log(e.range.columnStart) //returns the start column of the range I've edited Logger.log(SpreadsheetApp.getActiveSpreadsheet().getActiveSheet().getDataRange().columnStart) //Weird result, even if my sheet is populated with values it returns 'undefined' } In this example you see the

How to determine which row has changed/updated on Google Sheets Script Editor

只谈情不闲聊 提交于 2019-12-20 01:52:09
问题 For my google sheets, each row gets populated at random, but when it does get populated, I want a function to run. Each time something gets populated, it's the next row (it's not a cell or a random row). I have the onChange trigger running right now. It is set to "run FunctionA from Spreadsheet on change". In that function, how do I grab the row that has been specifically changed/updated? What is the function/method I would use to manipulate whatever that row is? I searched around but couldn

External Editor Support for Google Apps Script

ぃ、小莉子 提交于 2019-12-18 10:51:07
问题 I am using Google Apps Script and was wondering if I could use any sort of editor outside of the one Google provides. (I purchased Sublime Text and would like to use that.) The one Google provides is disgusting, with tiny text even though I have a giant screen and syntax colors that I find a bit difficult to distinguish on a white background with small text, and I don't have the beauties of Sublime like tons of custom keyboard shortcuts, all of my packages, etc. 回答1: Google has dropped

Experiencing a frozen blank page on Google Script editor from Drive

感情迁移 提交于 2019-12-13 05:24:15
问题 this morning, opening the Script Editor from Google Drive, on chrome browser, I get a frozen page, with the script area blank, and the menu greyed and disabled. This happen on my scripts, but also on other users. Is anyone else experiencing this? 回答1: Switch you drive locale settings to English and it will work. This is a temporary workaround to use until they fix the bug. see issue 4339 来源: https://stackoverflow.com/questions/25681358/experiencing-a-frozen-blank-page-on-google-script-editor