BASE

function BASE(
  arg1: number = null,
  arg2: number = null,
  arg3: number = null,
): number | string | boolean

Description

Converts a number into a text representation with the given radix (base).

Parameters

arg1numberdefault: null

Is the number that you want to convert.

arg2numberdefault: null

Is the base Radix that you want to convert the number into.

arg3numberdefault: null

Is the minimum length of the returned string. If omitted leading zeros are not added.

Returns

number | string | boolean

Try It

var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.BASE(5, 2, 5));

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).