GetReply
返回指定的批注回复。
语法
expression.GetReply(nIndex);
expression - 表示 ApiComment 类的变量。
参数
| 名称 | 必需/可选 | 数据类型 | 默认值 | 描述 |
|---|---|---|---|---|
| nIndex | 可选 | Number | 0 | 批注回复索引。 |
返回值
示例
此示例展示如何获取指定的批注回复。
// How to get a reply to the comment.
// Add a cooment reply text to a range of the worksheet.
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();
worksheet.GetRange("A3").SetValue("Comment's reply text: ");
worksheet.GetRange("B3").SetValue(reply.GetText());