Is it possible to use native spreadsheet functions such as sum() or today() in google apps script, when writing code for google Spreadsheet? If so, how do I do it?
相关问题
- How can I force all files in a folder to be owned
- Google Apps Script: testing doPost() with cURL
- Google Apps Script to turn in, grade, and return a
- Script fails on SpreadsheetApp.openById - Requires
- Split Lines and Bold Text within a ui.alert Window
相关文章
- How to allow access for importrange function via a
- Google app script trigger not working
- Set Date/Time to 00:00:00
- indexOf returning -1 despite object being in the a
- Using MIN() inside ARRAYFORMULA()
- How can my Google Apps Script be run by others the
- Google Spreadsheet COUNTIF formula equivalent with
- In Google Sheets how to reference infinite rows in
Also might be good to refer to this article about using Javascript objects to read and write to cells. I can't think of any good reason for using functions in VBA or Apps Script unless they are doing so indirectly through reading a cell value. https://developers.google.com/apps-script/guides/sheets#reading
Goggle Apps Script is JavaScript, spreadsheets functions are not available and using a workaround like setFormula followed by getValue is not only cumbersome but really slow and inefficient.You will be better inspired to use JavaScript and Google services to manipulate data taken from a spreadsheet and write the data back in one single setValues().
https://developers.google.com/apps-script/reference/spreadsheet/range#setFormula(String)