如何在谷歌表格中更新作者的评论详细信息?

时间:2021-02-03 03:26:48

标签: google-apps-script google-sheets google-drive-api

我想使用 displayName 服务和 email 服务更新 Google 表格中评论者的 SpreadsheetDrive

我同时使用了 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 中评论者的 emaildisplay name 的任何进一步信息。

0 个答案:

没有答案
相关问题