我想使用 displayName
服务和 email
服务更新 Google 表格中评论者的 Spreadsheet
和 Drive
。
我同时使用了 Drive.comments.patch(comments, fileId, commentID)
、Drive.comments.patch(comments, fileId, commentID)
来实现相同的效果,脚本运行成功但在 google 表格中没有效果并且不会更改任何评论
function maskComment() {
var currentSpreadsheet = SpreadsheetApp.getActiveSpreadsheet();
var FileID =currentSpreadsheet.getId()
var commentsList = Drive.Comments.list(FileID)
//No effect in any of this, however the debugger lists both setDisplayName and setEmailAddress
commentsList.items[0].author.setDisplayName("company user");
commentsList.items[0].author.setEmailAddress('test@mycompany.com');
//No effect in any of this but code runs successfully
Drive.Comments.patch(commentsList.items[0], FileID, commentsList.items[0].commentId) //or Drive.Comments.update(commentsList.items[0], FileID, commentsList.items[0].commentId) No
}
我将感谢有关更改 google-sheets 中评论者的 email
和 display name
的任何进一步信息。