Class representing a comment.
Name | Type | Description |
Text | string | Returns or sets the comment text. |
Id | string | Returns the current comment ID. |
AuthorName | string | Returns or sets the comment author's name. |
UserId | string | Returns or sets the user ID of the comment author. |
Solved | boolean | Checks if a comment is solved or not or marks a comment as solved. |
TimeUTC | number | string | Returns or sets the timestamp of the comment creation in UTC format. |
Time | number | string | Returns or sets the timestamp of the comment creation in the current time zone format. |
QuoteText | string | Returns the quote text of the current comment. |
RepliesCount | Number | Returns a number of the comment replies. |
Name | Description |
AddReply | Adds a reply to a comment. |
Delete | Deletes the ApiComment object. |
GetAuthorName | Returns the comment author's name. |
GetClassType | Returns a type of the ApiComment class. |
GetId | Returns the current comment ID. |
GetQuoteText | Returns the quote text of the current comment. |
GetRepliesCount | Returns a number of the comment replies. |
GetReply | Returns the specified comment reply. |
GetText | Returns the comment text. |
GetTime | Returns the timestamp of the comment creation in the current time zone format. |
GetTimeUTC | Returns the timestamp of the comment creation in UTC format. |
GetUserId | Returns the user ID of the comment author. |
IsSolved | Checks if a comment is solved or not. |
RemoveReplies | Removes the specified comment replies. |
SetAuthorName | Sets the comment author's name. |
SetSolved | Marks a comment as solved. |
SetText | Sets the comment text. |
SetTime | Sets the timestamp of the comment creation in the current time zone format. |
SetTimeUTC | Sets the timestamp of the comment creation in UTC format. |
SetUserId | Sets the user ID to the comment author. |
builder.CreateFile("xlsx"); var oWorksheet = Api.GetActiveSheet(); oWorksheet.GetRange("A1").SetValue("1"); var oRange = oWorksheet.GetRange("A1"); var oComment = oRange.AddComment("This is just a number."); oWorksheet.GetRange("A3").SetValue("Comment: " + oComment.GetText()); oWorksheet.GetRange("A4").SetValue("Comment Id: "); oWorksheet.GetRange("B4").SetValue(oRange.GetComment().GetId()); oWorksheet.GetRange("A5").SetValue("Comment's quote text: " + oComment.GetQuoteText()); var sType = oComment.GetClassType(); oWorksheet.GetRange("A6").SetValue("Type: " + sType); oComment.SetAuthorName("Mark Potato"); oWorksheet.GetRange("A7").SetValue("Comment's author: " + oComment.GetAuthorName()); oComment.SetUserId("uid-2"); oWorksheet.GetRange("A8").SetValue("Comment's user Id: " + oComment.GetUserId()); oComment.SetTime(Date.now()); oWorksheet.GetRange("A9").SetValue("Timestamp: " + oComment.GetTime()); oComment.SetTimeUTC(Date.now()); oWorksheet.GetRange("A10").SetValue("Timestamp UTC: " + oComment.GetTimeUTC()); oComment.SetSolved(true); oWorksheet.GetRange("A11").SetValue("Comment is solved: " + oComment.IsSolved()); oComment.AddReply("Reply 1", "John Smith", "uid-1"); oComment.AddReply("Reply 2", "John Smith", "uid-1"); oComment.RemoveReplies(0, 1, false); oWorksheet.GetRange("A12").SetValue("Comment replies count: " + oComment.GetRepliesCount()); var oReply = oComment.GetReply(); oWorksheet.GetRange("A13").SetValue("Comment's reply text: " + oReply.GetText()); builder.SaveFile("xlsx", "ApiComment.xlsx"); builder.CloseFile();