2

I am able to retrieve all comments for a spreadsheet. However, I want to know the exact sheet and cell range the comment is anchored to. I have looked at the values within the anchor property of the comments resource that is returned by the Comments.list() method:

var commentsResource = Drive.Comments.list(ss.getId());

In looking at the results, the only thing that I see that resembles a location is the "range" key in the json string within the "anchor" property of the resource:

"{"type":"workbook-range","uid":0,"range":"1303483326"}"

I have found documentation on an anchor property, but I don't believe it is applies to the one for spreadsheet comments. This is what I found: https://developers.google.com/drive/v3/web/manage-comments There is no description on how to interpret the value for the "range" key above. And other things that documentation describes are not present in my object.

Any ideas on how to interpret the above-mentioned range value? A pointer to any doc would be brilliant. I have indeed looked exhaustively, but must not be asking the right question because I cannot find any doc on this property. Guidance is very much appreciated.

MichaelB
  • 175
  • 1
  • 10
  • I don't think it can be done - the Drive API you mention lets one find comments, but not really do anything with them after that. – tehhowch Mar 13 '18 at 11:50
  • Related: [Creating anchored comments programmatically in Google Docs](https://stackoverflow.com/q/23498275/1595451) – Rubén Mar 13 '18 at 19:04
  • I think that you can achieve your goal by using the workaround of this thread. https://stackoverflow.com/a/64058248/7108653 – Tanaike Sep 25 '20 at 05:21

1 Answers1

2

At this time, this it's not possible. Please star the feature request about this: Provide read/write access to comments in Google Sheets

Related Q&A

Rubén
  • 34,714
  • 9
  • 70
  • 166