SetText
设置批注回复文本。
语法
expression.SetText(sText);
expression - 表示 ApiCommentReply 类的变量。
参数
| 名称 | 必需/可选 | 数据类型 | 默认值 | 描述 |
|---|---|---|---|---|
| sText | 必需 | string | 批注回复文本。 |
返回值
此方法不返回任何数据。
示例
更新电子表格中批注回复的书面消息。
// How do I edit the text of an existing reply to a comment in a spreadsheet?
// Overwrite the current reply content with new wording in a spreadsheet.
let worksheet = Api.GetActiveSheet();
worksheet.GetRange("A1").SetValue("1");
let range = worksheet.GetRange("A1");
let comment = range.AddComment("This is just a number.");
comment.AddReply("Reply 1", "John Smith", "uid-1");
let reply = comment.GetReply();
reply.SetText("New reply text.");
worksheet.GetRange("A3").SetValue("Comment's reply text: ");
worksheet.GetRange("B3").SetValue(reply.GetText());