TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

RIGHT

Returns the specified number of characters from the end of a text string.

Parameters:

Name Type Description
arg1 string

The text string that contains the characters to extract.

arg2 number

A number of the substring characters. If it is omitted, the function will assume it to be 1.

Returns:

Type
string

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.RIGHT("Online Office", 2));
builder.SaveFile("xlsx", "RIGHT.xlsx");
builder.CloseFile();

Resulting document