How to GetComments from google sheets

2019-09-12 05:26发布

I want to get comments from google sheets based on cell range in my script program But found that range.getComment() method is deprecated and now returning notes only.

Please let me know what is the replacement of getComment() method or what are the other ways to get comments from google sheet in my script program?

1条回答
forever°为你锁心
2楼-- · 2019-09-12 05:56

Unfortunately, it looks like Google Apps Script can only retrieve the notes from a range:

https://developers.google.com/apps-script/reference/spreadsheet/range#getNotes()

There is no equivalent getComments() function.

This is an issue that has been officially raised here: https://code.google.com/p/google-apps-script-issues/issues/detail?id=1818

One of the developers has noted that:

We are aware of the demand for this feature, but there is no work going on at the moment. As a partial solution, you can use the Drive Advanced Service to read all the comments and replied on a spreadsheet, but you aren't able to create new comments or determine to which cell a given comment is attached to.

So it is possible to grab all comments, just not which cells those comments are associated with.

查看更多
登录 后发表回答