Contact

COMPLEX Function in ONLYOFFICE Spreadsheet Editor: Real and Imaginary Parts

Engineering Intermediate ONLYOFFICE Spreadsheet Editor

Learn ONLYOFFICE COMPLEX(real_num, i_num, [suffix]) with an exact input table, expected complex-number forms, practical engineering examples, errors and edition cautions.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Availability and version history

  • Introduced: The original introduction version and date are not established by the official sources checked.
  • Availability: Documented in the current ONLYOFFICE Spreadsheet Editor help; no final working-version endpoint is established.
  • Scope: Docs and Desktop Editors release separately. This unversioned help does not establish availability in every older build, mobile client or deployment.
  • Checked: October 14, 2026, against the official function reference. Documentation check; not a new native test.

Quick answer

Combine separate real and imaginary components into a single complex-number representation written with i or j. Its exact current English-reference syntax is =COMPLEX(real_num, i_num, [suffix]). This is documented in the official ONLYOFFICE COMPLEX function reference, checked 2026-10-13 UTC. Any square brackets in the syntax indicate an optional argument; they are not characters to enter in your formula.

Evidence boundary: Vendor claim checks cover purpose/arguments/current documentation; sample results are separately computed mathematical predictions and were not observed in ONLYOFFICE.

Syntax, argument order, types and defaults

=COMPLEX(real_num, i_num, [suffix])
Argument Required Definition Default
real_num Yes Numeric real component, supplied directly or by cell reference. —
i_num Yes Numeric imaginary component (coefficient of i or j). —
suffix No Lowercase text suffix "i" or "j"; controls the imaginary unit. "i" (explicitly documented)

Argument rule: Three positions, of which the third is optional. Numbers with an imaginary unit should use lowercase i or j as specified by the vendor; direct literal coercion beyond the documented notation is not guaranteed. Do not confuse English argument separators with decimal separators.

Build the practice sheet from scratch

In a new worksheet, type the following records. The numbers in B and C must be numeric cells; D contains a lowercase text suffix (i or j). Type the headers into row 1 and the data into rows 2–9. Leave columns E onward empty until entering the formulas. This dataset is original teaching data and does not depend on a downloaded example file.

Row A: Signal B: Real component C: Imaginary component D: Suffix Complex number represented mathematically
2 Calibration 3 4 i 3+4i
3 Offset -5 12 i -5+12i
4 Reactive 0 -2 j 0-2j
5 Reversed -3 -4 i -3-4i
6 Aligned 8 0 i 8
7 Origin 0 0 i 0
8 Quadrant II -1 1 i -1+1i
9 Quadrant IV 1 -1 i 1-1i

Select E2 (outside the input table) and enter =COMPLEX(B2,C2,D2). Fill E2 down through E9. This uses the documented three-argument form and lets every later example read the same complex-number cells. If the calculated text contains a simplified zero term, compare the mathematical number rather than presuming a precise string-rendering convention—the official function pages do not specify all serialization cases. Do not paste explanatory table labels into numeric fields.

Worked formulas: assemble a complex number

With the table above in place, follow these checks in separate result cells. The expressions at right describe mathematically expected numbers; ONLYOFFICE-specific formatting of omitted zero components and coefficients is not established by the help article.

Enter into an unused cell Expected mathematical meaning Explanation
=COMPLEX(B2,C2) 3+4i Two required arguments; i is the documented default suffix.
=COMPLEX(B2,C2,"j") 3+4j Uses lowercase j, common in electrical engineering.
=COMPLEX(3,-4,"i") 3-4i The imaginary component is negative; the sign is part of the complex value.
=COMPLEX(B3,C3,D3) -5+12i Both components may be signed.
=COMPLEX(B4,C4,D4) mathematically -2j A zero real component need not be shown verbatim; exact rendering is untested.
=COMPLEX(B6,C6,D6) mathematically 8 An imaginary coefficient of zero still defines a complex value.

Reproduce: (1) Confirm B2 is numeric 3 and C2 is numeric 4; (2) select a blank cell such as G2; (3) enter the first formula and confirm its mathematical interpretation; (4) in G3, enter the explicit-j variant; (5) change neither input cell while comparing. A screenshot from a different spreadsheet program is not a valid comparison.

More practical example: electrical impedance

Represent resistance and reactance in two numeric columns, then combine them into an impedance phasor. With B2=3 ohms and C2=4 ohms, =COMPLEX(B2,C2,"j") represents 3+4j ohms. Use a numeric magnitude calculation, =IMABS(COMPLEX(B2,C2,"j")), to predict 5 ohms. The magnitude identity is sqrt(3²+4²)=5; the numeric result is an independently calculated expected value. j avoids collision with the usual electrical-current symbol i, but either suffix is officially permitted.

A common category mistake is expecting COMPLEX to return two numeric cells or a visible x, y tuple. Its purpose is to produce one complex-number representation. For separate components use the linked official IMREAL and IMAGINARY functions.

Advanced composition and validation

Put =COMPLEX(B3,C3,D3) in G3 and =IMREAL(G3) in H3, =IMAGINARY(G3) in I3. The mathematical prediction is H3 = -5, I3 = 12. Recompose in J3 using =COMPLEX(H3,I3,D3): the same complex number should be represented regardless of any harmless formatting changes. This checks the independent real/imaginary components instead of comparing a fragile string literal.

For a signal with B4=0 and C4=-2, the mathematics says the imaginary component is -2 even if a display omits the zero real term. Do not parse the resulting text with fixed character positions (LEFT or MID); signs, length and the optional j suffix make that brittle.

Mistakes, error investigations and limits

Wrong suffix: The vendor expressly permits only lowercase "i" and "j". Treat uppercase "I", uppercase "J", extra spaces and other letters as unsupported inputs pending native test; the article does not specify a definitive error code for each. Quoted numeric fields: check whether B/C are numeric cells rather than strings such as "3 ohms". Wrong argument order: =COMPLEX(C2,B2) swaps the components and mathematically represents 4+3i, not 3+4i. Unsupported separators: a semicolon or comma may be required based on local formula language/settings; follow the editor’s assistant. Zero terms and unit coefficients: do not assume the returned text must contain 0+ or 1i; the article’s synopsis does not completely define serialization. Version mismatches: an older client or embedded server may behave differently; identify exact builds before claiming parity.

For troubleshooting, first enter =COMPLEX(3,4,"i") in a blank cell, inspect the formula bar for =, commas and quotes, then compare B2/C2/D2. If a result is text instead of a function, adjust the destination cell format. If your copy of the software reports an error, record the actual error and build number; this manuscript does not invent error results.

ONLYOFFICE-specific setup and locale cautions

In the current ONLYOFFICE Spreadsheet Editor Help Center, these functions appear in the Engineering group. To locate them, use Formula → More functions → Engineering, or the Insert Function dialog and search for the exact English name. You can also type formulas directly, starting with =. This navigation and keyboard entry method are documented by the official Insert Functions guide (checked 2026-10-13).

All formulas here use the official English names and comma-delimited syntax. The ONLYOFFICE Advanced Settings reference explains that formula language and regional settings can vary. If your editor displays a translated function name or expects another list separator, use its formula assistant rather than blindly substituting punctuation. Decimal commas and argument separators are separate regional concerns. In example formulas, literal complex numbers and the suffix are text in double quotes; unquoted entries such as 3+4i are not equivalent to a quoted text literal.

Edition and version applicability

The current unversioned ONLYOFFICE Docs Help Center documents this function. That verifies present official documentation, not a first-supported version, successful execution in every deployed Docs server, or equivalent outcomes in all versions of Desktop Editors. The ONLYOFFICE Docs changelog and Desktop Editors changelog were consulted on 2026-10-13; neither was used to infer an undocumented first introduction release for this function. Native tests on identified Docs/web and Desktop versions are still required, especially for edge-case parsing, exact error text, and round-trip formatting. Excel, Google Sheets, other spreadsheet products and cmath are not evidence of ONLYOFFICE’s native behaviour.

Verification and limitations

Verification: Argument definitions and purposes come from the linked official references. Expected values were independently calculated. Native ONLYOFFICE Docs web or Desktop execution, historical-edition testing, localized syntax, exact errors and output formatting were not tested.

Official references checked on 2026-10-13 UTC