google-sheets-custom-function

Error msg from custom function when trying to open another spreadsheet. “You do not have permission to perform that action.”

南楼画角 提交于 2021-02-10 20:24:17
问题 I have a custom function that I want to use to retrieve the cell value in a sheet from another spreadsheet. The two parameters of the function are row and col and they determine the cell to reference. Whenever I try to use the function, I get the error "You do not have permission to perform that action." , pointing to the line with the openByID method. Here is my custom function: function TEST(row,col) { var formDataSpreadsheet = SpreadsheetApp.openById(FORM_DATA_SPREADSHEET_ID);

Make a simple counter in Google Scripts which keeps track of previous value

一个人想着一个人 提交于 2021-01-29 14:23:47
问题 so I'm trying to make an auto-rotating schedule using google sheets and a custom function which selects a new employee from a linked sheet each week and then starts again at the top of the list when it gets to the bottom, using a Google trigger to run the counter every 7 days. I'm having a hard time figuring out how to store a value in the spreadsheet each week to store the counter's value and then refer to that same value when the function runs again to update the counter. I'm also having an

Stop a custom function from recalculating every time the spreadsheet is open?

让人想犯罪 __ 提交于 2021-01-28 05:35:27
问题 I have a custom function that uses fetch to save some information to a spreadsheet. The problem is, it's meant to be used many times on the spreadsheet, fetching from various pages. As the amount of uses increases, needlessly re-fetching information every time the spreadsheet opens will become more and more of a problem. Is there any way to avoid this default behavior? I still want it to recalculate every time the cell is edited, even if the parameters are exactly the same. Is there perhaps a

Can I pass an array into a Google App Script method from a Google Spreadsheet?

一曲冷凌霜 提交于 2021-01-24 14:17:19
问题 Can I pass an array into a Google App Script method from a Google Spreadsheet? Suppose I have an App Script function that expects a list with two elements (note: this example is just an example so please do not tell me that my problem would be solved if I simply passed each element as a separate argument). How do I call this function from a Google Spreadsheet cell? I've tried both: '=myFunc([1,2])' and '=myFunc((1,2))' and both give me a Parse Error. 回答1: In a spreadsheet formula, you can

Can I pass an array into a Google App Script method from a Google Spreadsheet?

流过昼夜 提交于 2021-01-24 14:12:19
问题 Can I pass an array into a Google App Script method from a Google Spreadsheet? Suppose I have an App Script function that expects a list with two elements (note: this example is just an example so please do not tell me that my problem would be solved if I simply passed each element as a separate argument). How do I call this function from a Google Spreadsheet cell? I've tried both: '=myFunc([1,2])' and '=myFunc((1,2))' and both give me a Parse Error. 回答1: In a spreadsheet formula, you can

Can I pass an array into a Google App Script method from a Google Spreadsheet?

余生颓废 提交于 2021-01-24 14:10:09
问题 Can I pass an array into a Google App Script method from a Google Spreadsheet? Suppose I have an App Script function that expects a list with two elements (note: this example is just an example so please do not tell me that my problem would be solved if I simply passed each element as a separate argument). How do I call this function from a Google Spreadsheet cell? I've tried both: '=myFunc([1,2])' and '=myFunc((1,2))' and both give me a Parse Error. 回答1: In a spreadsheet formula, you can

Can I pass an array into a Google App Script method from a Google Spreadsheet?

 ̄綄美尐妖づ 提交于 2021-01-24 14:07:21
问题 Can I pass an array into a Google App Script method from a Google Spreadsheet? Suppose I have an App Script function that expects a list with two elements (note: this example is just an example so please do not tell me that my problem would be solved if I simply passed each element as a separate argument). How do I call this function from a Google Spreadsheet cell? I've tried both: '=myFunc([1,2])' and '=myFunc((1,2))' and both give me a Parse Error. 回答1: In a spreadsheet formula, you can