Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get a note or comment

I have an Excel containing cell comments/notes, I've uploaded it to Google Drive, and converted it into a Google Spreadsheet. How may I retrieve the comments for cell A1?

The API doesn't describe how to get a note or comment from a cell.

like image 499
Kokizzu Avatar asked Dec 19 '22 00:12

Kokizzu


1 Answers

The Google Apps Spreadsheet API only provides programmatic access to spreadsheet data. You cannot access comments using the API.

You can get the Notes for a cell or range of cells using Google Apps Script. See the Class Range documentation for these methods:

  • getNote() - Returns the note associated with the given cell.
  • getNotes() - Returns the notes associated with the cells in the range.

There are open issues related to this functionality, mainly concerning comments (the "other" type of note). See Issue 1818 and Issue 2566

In a comment on your question, SGC asks if you've looked at developers.google.com/drive/v2/reference/comments/get and developers.google.com/drive/v2/reference/comments/list; these are FILE level comments, not the comments attached to a spreadsheet cell.

like image 156
Mogsdad Avatar answered Jan 13 '23 14:01

Mogsdad