Format
function Format(expression: string = null, format: string = null): string
Description
Returns a class formatted according to the instructions contained in the format expression.
Parameters
- expression
string
null Any valid expression.
- format
string
null A valid named or user-defined format expression.
Returns
string
Try It
var oWorksheet = Api.GetActiveSheet();
var oFormat = Api.Format("123456", "$#,##0");
oWorksheet.GetRange("A1").SetValue(oFormat);