google-sheets

Google Sheets cell info

一笑奈何 提交于 2021-02-04 08:25:34
问题 I am doing a ledger for accounting purposes. I have it set up like a checkbook registry. It has 4 columns: Date, Description, Amount and Balance. The formula set up in the last column (Balance) is set up to add the number in the "Amount" column to the balance in the last line entry. The formula is copied down the page in the last column. What I would like to do, is only have a number in that column if there is an entry on that line. Here is my question: Is there a way to hide the number in

Script 'setValues' method interprets strings as numbers in cells

偶尔善良 提交于 2021-02-04 08:12:12
问题 I have been using Apps Script in Google Sheets with methods getValues and setValues . The returned values in the arrays are further manipulated, and they are meant to be JS Strings and set in cells as Text. After using setValues the values inside cells are interpreted as (special format) numbers, if the string allows it, and inside the cells they are actually numbers even though the values inside the array are JS Strings. Can we tell via script that these string values be set as Text in cells

Formulas always recalculating when refreshing/loading spreadsheet

时光怂恿深爱的人放手 提交于 2021-02-04 06:51:50
问题 Anytime I refresh my spreadsheet tab, the formulas begin recalculating. Not entirely sure why this is happening since the data has not changed, and the formulas have previously been loaded. How do I stop this? My spreadsheet settings are set to refresh on change and every hour. 回答1: It doesn't look like you can stop a recalculation at this time. "On change", "On change and every minute", and "On change and every hour" seem to be the only options. Here is a link from 2017: https:/

Show Alert Popup when cell selection is changed (onSelectionChange)

不打扰是莪最后的温柔 提交于 2021-02-02 09:44:26
问题 I am trying to show an alert popup when cell selection is changed, using the new trigger onSelectionChange . For some reason it is not showing any alerts. Am i doing something wrong or alerts does not work with this trigger? function onSelectionChange(e) { showAlert(); } function showAlert() { var ui = SpreadsheetApp.getUi(); var result = ui.alert( 'ALERT!', 'ALERT MESSAGE.', ui.ButtonSet.OK); } I also tried that way: function onSelectionChange(e) { var ui = SpreadsheetApp.getUi(); var result

How to use in Google Sheets setValue only for range of filtered rows (getRange for not hidden cells)?

泄露秘密 提交于 2021-02-02 09:41:53
问题 I want to know, how to use setValue, if there are filtered rows, so that only the shown rows (C1 + one row down to last row of C) get a value. x(){ var sheet = SpreadsheetApp.getActiveSheet(); var lastRow = sheet.getLastRow(); sheet.getRange(C2, lastRow).setValue('x'); } Update It works, but very slowly. I have tested the following code and it works fast. It must start in the second shown row. The following solution works both with and without filter. What is not yet running is the second row

How to use in Google Sheets setValue only for range of filtered rows (getRange for not hidden cells)?

假装没事ソ 提交于 2021-02-02 09:41:06
问题 I want to know, how to use setValue, if there are filtered rows, so that only the shown rows (C1 + one row down to last row of C) get a value. x(){ var sheet = SpreadsheetApp.getActiveSheet(); var lastRow = sheet.getLastRow(); sheet.getRange(C2, lastRow).setValue('x'); } Update It works, but very slowly. I have tested the following code and it works fast. It must start in the second shown row. The following solution works both with and without filter. What is not yet running is the second row

Google Spreadsheet - Show sheets depending on type of user

混江龙づ霸主 提交于 2021-02-02 09:30:25
问题 Is there a way, to make a certain sheet in Google Spreadsheets, be editable and accessible to a certain type of user, while not be accessible to another type of user? I currently have a Google App Script project, that allows a certain user to use an HTML form to input certain parameters, and a Google Spreadsheet is automatically created for him (thus, everything in the spreadsheet is created programatically). This new spreadsheet should have access by different "types" of users. A "type" of

Google Spreadsheet - Show sheets depending on type of user

[亡魂溺海] 提交于 2021-02-02 09:30:20
问题 Is there a way, to make a certain sheet in Google Spreadsheets, be editable and accessible to a certain type of user, while not be accessible to another type of user? I currently have a Google App Script project, that allows a certain user to use an HTML form to input certain parameters, and a Google Spreadsheet is automatically created for him (thus, everything in the spreadsheet is created programatically). This new spreadsheet should have access by different "types" of users. A "type" of

Google Spreadsheet - Show sheets depending on type of user

淺唱寂寞╮ 提交于 2021-02-02 09:30:15
问题 Is there a way, to make a certain sheet in Google Spreadsheets, be editable and accessible to a certain type of user, while not be accessible to another type of user? I currently have a Google App Script project, that allows a certain user to use an HTML form to input certain parameters, and a Google Spreadsheet is automatically created for him (thus, everything in the spreadsheet is created programatically). This new spreadsheet should have access by different "types" of users. A "type" of

Google App Script getActiveSheet returns leftmost sheet, not active sheet

限于喜欢 提交于 2021-01-29 20:57:37
问题 I guess this question is the most similar to my current question. But basically, I have a google sheets file that has several sheets along the bottom. I would like for the user to execute this script on whatever sheet they have open at the time. And like the previous question said according to this documentation, the active sheet is the one that is being displayed in the spreadsheet UI. I assume this means if I have the google sheets file open in another tab, that the sheet currently selected