Reputation: 209
Am trying to set formula for a cell in goole spreadsheet using apps script....
Everything going fine until am working in same work sheet, but i have tried to update a cell using another worksheet from the same spreadsheet as follows,
sheet.getRange(1,1,1,1).setValue("=Ref!A15");
but it shows error:Unknown range name Ref!A15
i dont know what am missing here, can anyone please help me to solve this issue...
Thanks in Advance...
Upvotes: 0
Views: 282
Reputation: 1142
You are getting this error because it is trying to find a named range and failing. Instead, use: sheet.getRange(1,1,1,1).setFormula("=Ref!A15");
to set a formula for a cell.
Upvotes: 1