Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How get comments from cells with Google Sheets api

How i can get comments using Google sheets api?

fields=sheets/data/rowData/values/note return only notes

For example it's note note and it's comment comment

So how i can get comments?

like image 208
Dakla Avatar asked Dec 18 '25 11:12

Dakla


2 Answers

You can list comments using the Google Drive API. Using the spreadsheet ID you can reference the file in Google Drive too.

To list the comments of your spreadsheet call the Comments: list endpoint.

curl \
  'https://www.googleapis.com/drive/v3/files/[YOUR_SPREADSHEET_ID]/comments?fields=*&key=[YOUR_API_KEY]' \
  --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
  --header 'Accept: application/json' \
  --compressed
like image 112
Alessandro Avatar answered Dec 19 '25 23:12

Alessandro


It's available as the note field in CellData which you can get through spreadsheets.get with the includeGridData parameters set to true

like image 30
Rubydesic Avatar answered Dec 20 '25 00:12

Rubydesic



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!