COMPLEX

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

Description

Converts real and imaginary coefficients into a complex number.

Parameters

arg1anydefault: null

Is the real coefficient of the complex number.

arg2anydefault: null

Is the imaginary coefficient of the complex number.

arg3anydefault: null

Is the suffix for the imaginary component of the complex number.

Returns

number | string | boolean

Try It

var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.COMPLEX(-2, 2.5, "i"));

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