4

When I'm scripting and want to use a standard function e.g. WEEKNUM, is this possible directly or do I have to trigger the Formula into another field via setFormula(formula) and afterwards read the content from the related cell?

Mogsdad
  • 44,709
  • 21
  • 151
  • 275
Farbkreis
  • 604
  • 3
  • 12

1 Answers1

2

The approach you describe is indeed possible but not efficient at all because it needs multiple calls to spreadsheet read / write which are relatively slow...

Using Native spreadsheet functions in JavaScript (Google-Apps-Script) is otherwise not possible.

Try to find an equivalent in JavaScript instead.

If you don't know how to get some result in JS, a search on Google will in most case bring an answer.

For your example of WEEKNUM, a search would return this result for example

Community
  • 1
  • 1
Serge insas
  • 45,904
  • 7
  • 105
  • 131