Skip to content Skip to sidebar Skip to footer

Setvalue To Query() Formula Doesn't Work?

Part of my spreadsheet's script runs the following piece of code: temp.getRange(1, 1).setValue('=QUERY(data!A1:H125, \'Select A\')'); As you might expect, this puts =QUERY(data!A1

Solution 1:

I found the answer on the Google support forums. The setFormula function is required rather than the setValue function.

ie. temp.getRange(1, 1).setFormula("=QUERY(data!A1:H125, \"Select A\")"); should work

Post a Comment for "Setvalue To Query() Formula Doesn't Work?"