TRY NEW VERSION

NOW

NOW() → { number | string | boolean }

Returns the current date and time formatted as a date and time..

Parameters:

This method doesn't have any parameters.

Returns:

Type
number | string | boolean

Example

Copy code
builder.CreateFile("xlsx");

const oWorksheet = Api.GetActiveSheet();

var oFunction = Api.GetWorksheetFunction();
var ans = oFunction.NOW(); 

oWorksheet.GetRange("C1").SetValue(ans);

builder.SaveFile("xlsx", "NOW.xlsx");
builder.CloseFile();

Resulting document