TRY NEW VERSION

T

T(arg1) → { string }

Checks whether a value is text, and returns the text if it is, or returns double quotes (empty text) if it is not.

Parameters:

Name Type Description
arg1 any

The value to test.

Returns:

Type
string

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.T("date and time"));
builder.SaveFile("xlsx", "T.xlsx");
builder.CloseFile();

Resulting document