-2

I want to use a function on a cell with gspread, how does it work?

tried this:

cell_b2 = worksheet.COUNT(D3,E7).value

the function I want to execute using gspread

does not work

  • 1
    [Lookup custom functions](https://developers.google.com/apps-script/guides/sheets/functions) – Cooper May 08 '23 at 18:14
  • I have to apologize for my poor English skill. What does `convert my cells using a named function while reading it with gspread` mean? – Tanaike May 09 '23 at 01:06
  • `I want to use a function on a cell with gspread, how does it work?` It can **NOT** be done. We can't suggest a workaround/alternative because you have not described the outcome that you are trying to reach. – Tedinoz May 11 '23 at 04:49
  • Does this answer your question? [Using built-in spreadsheet functions in a script](https://stackoverflow.com/questions/11660574/using-built-in-spreadsheet-functions-in-a-script) – Tedinoz May 11 '23 at 04:52

1 Answers1

0

Hi unfortunately it does not work this way.

In order to use a spreadsheet function (like COUNT or IF etc) you must update the cell where you want that function using methods like: update_acell that will update a single celle with the new content.

Example:

worksheet.update_acell("A1", "=COUNT(D3,E7)")

then the result can be seen in the spreadsheet in the worksheet at the cell A1.

Lavigne958
  • 442
  • 5
  • 12