NUMBERVALUE

NUMBERVALUE(arg1, arg2, arg3) → { number }

Converts text to a number, in a locale-independent way.

Parameters:

Name Type Description
arg1 string

The string representing a number to convert.

arg2 string

The character used as the decimal separator in the string.

arg3 string

The character used as the group separator in the string.

Returns:

Type
number

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.NUMBERVALUE("2.500,27", ",", "."));
builder.SaveFile("xlsx", "NUMBERVALUE.xlsx");
builder.CloseFile();

Resulting document