IMREAL Function in ONLYOFFICE Spreadsheet Editor: Extract the Real Part
ONLYOFFICE IMREAL(inumber) explained with the real-component argument, exact sample worksheet, expected numbers, composition patterns and troubleshooting.
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
Read the real, non-imaginary component a from a complex number a+bi or a+bj. Its exact current English-reference syntax is =IMREAL(inumber). This is documented in the official ONLYOFFICE IMREAL 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
=IMREAL(inumber)
| Argument | Required | Definition | Default |
|---|---|---|---|
inumber |
Yes | One complex-number value or an expression/cell containing a number in x+yi or x+yj form. |
None |
Argument rule: One required input; no optional argument or default is documented. 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.
Reproduce the real-component extraction
After filling E2:E9 with =COMPLEX(B2,C2,D2) and dragging down, enter =IMREAL(E2) into F2 and fill through F9. Column F should represent the component in B without altering signs.
| Row | Complex value (mathematical) | Formula in F | Independently expected numeric output |
|---|---|---|---|
| 2 | 3+4i |
=IMREAL(E2) |
3 |
| 3 | -5+12i |
=IMREAL(E3) |
-5 |
| 4 | -2j |
=IMREAL(E4) |
0 |
| 5 | -3-4i |
=IMREAL(E5) |
-3 |
| 6 | 8 |
=IMREAL(E6) |
8 |
| 7 | 0 |
=IMREAL(E7) |
0 |
Because COMPLEX uses a stored complex-number representation, copying a hand-entered literal can introduce a spelling, sign or whitespace error. Prefer constructing E from numeric B and C when checking this worksheet.
One-cell control: =IMREAL(COMPLEX(2,7,"j")) should mathematically return 2, demonstrating that the lowercase j suffix does not change the real component. A second control, =IMREAL("-5+12i"), has the same mathematical expectation of -5, but exact direct-text parsing remains a separate native test from the official documented x+yi argument form.
Why it works
Write a complex number as z = a + bi. The real-part operator extracts a; it does not calculate the modulus sqrt(a²+b²) or erase the imaginary part from the source cell. For the row with z=-5+12i, the result -5 is negative even though the overall magnitude is positive 13. For the pure imaginary value -2j, the real part is zero.
Advanced use: classify and reconstruct
Place =IF(IMREAL(E3)<0,"Negative real component","Nonnegative real component") in an unused cell. The expected message is Negative real component because E3 represents -5+12i. That is a valid classification of the real part, not a statement about the sign of the complex number itself (complex numbers are not ordered like real numbers). See the vendor’s IF reference for the Boolean conditional.
For a round-trip check, use =COMPLEX(IMREAL(E3),IMAGINARY(E3),"i"). It mathematically represents -5+12i, matching E3. If string formatting differs, compare the separated component values rather than assuming identical text rendering. The pair of independent numeric outputs is useful when exporting complex measurements into separate columns for plotting or fitting.
A weighted real-component calculation, =2*IMREAL(E2)+IMREAL(E3), has expected output 1 (2×3−5). Contrast that with =IMABS(E2) = 5; extracting versus measuring are different operations.
Errors, edge cases and practical investigation
- Not a complex-number input:
=IMREAL("blue")does not match the vendor’sx+yi/x+yjspecification; the article does not publish an exhaustive error-code table. Capture your editor’s error rather than asserting one. - Missing argument: the function requires one
inumber, with no documented default. The one-argument form matters; don’t silently pass a second component. - Pure imaginary input: a number of the form 0+bi has a mathematical real part of 0. The precise acceptance/rendering of abbreviations such as bare
iis not documented in the checked Help Center, so useCOMPLEX(0,1)for a controlled test. - Signs and suffix:
-5+12jand-5+12ihave the same real component. The suffix does not negate a value; signed components do. - Cells imported from other editors: double quotes and locale formats can turn a purported numeric complex value into plain text. Recreate with COMPLEX and check the result again.
Troubleshoot progressively: first =IMREAL(COMPLEX(3,4)); then verify E2; then use F2 autofill; finally test any imported cell. Avoid trying to inspect numeric real components with LEFT or FIND, since canonical complex formatting is not guaranteed by the official function page.
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
- ONLYOFFICE IMREAL function: primary syntax and purpose.
- ONLYOFFICE Insert Functions: engineering category and how to enter formulas.
- ONLYOFFICE Spreadsheet Editor Advanced Settings: formula language and region.
- ONLYOFFICE Docs changelog: product release history, not proof of this function’s introduction.
- ONLYOFFICE Desktop Editors changelog: independent desktop release history.
- Related official references: COMPLEX, IMAGINARY, IMABS, IMARGUMENT.