NUMBERVALUE

function NUMBERVALUE(arg1: string = null, arg2: string = null, arg3: string = null): number

Description

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

Parameters

arg1stringdefault: null

The string representing a number to convert.

arg2stringdefault: null

The character used as the decimal separator in the string.

arg3stringdefault: null

The character used as the group separator in the string.

Returns

number

Try It

var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.NUMBERVALUE("2.500,27", ",", "."));

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).