Based on the answer of Lars Gunnar Wick , I will give an example in Python.
The corresponding bit of code is here:
body = { "requests": [ { "repeatCell": { "range": { "sheetId": 1704890600,
You can add a lot of comments by repeating objects within the "requests": [] list "requests": [] .
Some important points to pay attention to:
"sheetId" is the final number in the URL- If you want to add values ββand comments, I think you need to do it in two passes (I would like someone to prove that I am wrong in this!)
The following is a complete program that writes a comment:
import pickle import os.path from googleapiclient.discovery import build from google_auth_oauthlib.flow import InstalledAppFlow from google.auth.transport.requests import Request
You will need to add your own table id.
source share