TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

GetTime

GetTime() → { Number }

Returns the timestamp of the comment creation in the current time zone format.

Parameters:

This method doesn't have any parameters.

Returns:

Type
Number

Example

Copy code
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("Timestamp: " + oComment.GetTime());
builder.SaveFile("xlsx", "GetTime.xlsx");
builder.CloseFile();

Resulting document