[英]How Can I add comment on a cell using google sheet app script
How Can I add comment to google sheet using app script.如何使用应用脚本向谷歌表格添加评论。 I can add notes but i want to add comments.我可以添加注释,但我想添加评论。 tried different methods but no clue.尝试了不同的方法但没有线索。
.setcomments .setcomments
and和
.getcomments .getcomments
function not even exisit. function 甚至不存在。
I achive to add a comment with:我想添加评论:
function insertDriveComment(){
var fileId = 'your file id'
var resource = {'content': 'Here is my comment !'};
Drive.Comments.insert(resource, fileId)
}
you have to enable Drive API service你必须启用 Drive API 服务
or, if you use the same spreadsheet to add comments或者,如果您使用相同的电子表格添加评论
function insertDriveComment(){
var fileId = SpreadsheetApp.getActiveSpreadsheet().getId()
var resource = {'content': 'Here is my comment !'};
Drive.Comments.insert(resource, fileId)
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.