0

I get parsing error after i use setFormula. i try spreadsheetApp.flush(); and leave out the last bracket in the formula but i still get the error. the formula is in german but it isnt wrong, if i edit it after i run the code with out the last bracket and press enter in the cell the formula is working

for (i=1; i<50; i++)
   {
   var k=i+1
   var formula = "=WENN(ISTFEHLER(SVERWEIS(C"+k+"&\"10\";Bonus!$P$2:$Q$595;1;FALSCH));\" \";\"Rare\")"
   Sheet.getRange(i+1,26).setFormula(formula);
   }

Result Parsing Error

biber54
  • 49
  • 1
  • 6
  • It should be `SpreadsheetApp.flush();`, not `spreadsheetApp.flush();`. Can you give a sample of what you want your formula to look like? What are you [Locale settings](https://support.google.com/docs/answer/58515?co=GENIE.Platform%3DDesktop&hl=en)? Maybe you need to change `;` to `,`. – ziganotschka Apr 14 '20 at 15:46
  • @ziganotschka the formula in the cell should look like this `=WENN(ISTFEHLER(SVERWEIS(C3&"10";Bonus!$P$2:$Q$595;1;FALSCH));" ";"Rare")` english `=IF(ISERROR(VLOOKUP(C3&"10";Bonus!$P$2:$Q$595;1;FALSE));" ";"Rare")` . My Settings: Language: German Recalculation: on change ,Iterative calculation: off – biber54 Apr 14 '20 at 15:55
  • @ziganotschka `SpreadsheetApp.flush();` is not working too in my case – biber54 Apr 14 '20 at 16:01
  • What are you using it for? – ziganotschka Apr 14 '20 at 16:06
  • @ziganotschka for a online game to get data – biber54 Apr 14 '20 at 16:10
  • I mean in your code. `SpreadsheetApp.flush()` should be used after a time consuming request before proceeding with a new one. – ziganotschka Apr 15 '20 at 06:55

1 Answers1

1

It is a bug

It has already been filed on Google's Public Issue Tracker and hopefully will be solved in the future.

In the meantime, you need to implement a workaround:

  • Change your Locale to USA
  • Use the English version of the formula whereby ; need to be replaced through ,
ziganotschka
  • 25,866
  • 2
  • 16
  • 33