LEFT
function LEFT(arg1: string = null, arg2: number = null): string
Description
Returns the specified number of characters from the start of a text string.
Parameters
- arg1
string
null The text string containing the characters to extract.
- arg2
number
null A number of the substring characters. It must be greater than or equal to 0.
Returns
string
Try It
var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.LEFT("Online Office", 6));