DECIMAL Function in ONLYOFFICE Spreadsheet Editor: Syntax and Examples
Convert base-2 to base-36 text strings into decimal values using DECIMAL; check radix and invalid digits.
Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in ONLYOFFICE Spreadsheet Editor. How formula examples are checked
Quick answer
Use =DECIMAL(text, radix) to convert a number written as text in base 2–36 into its base-10 numeric value. For example, =DECIMAL("FF",16) is expected to return the number 255, because F represents fifteen in base 16: 15×16 + 15. The official ONLYOFFICE DECIMAL reference confirms the argument order, maximum input-text length 255, and integer radix 2 through 36. The result calculations here are independently checked, not natively executed in ONLYOFFICE.
What DECIMAL is for
DECIMAL is useful for interpreting binary flags, octal values, hexadecimal codes, system identifiers and base-36 strings in inventory or engineering worksheets. It is not a decimal-number separator or currency converter and does not turn an ordinary decimal string such as "1,234.50" into a number. For a locale-specific decimal separator, use NUMBERVALUE instead.
Exact official syntax and argument order
=DECIMAL(text, radix)
| Argument | Required? | Purpose and constraints | Example |
|---|---|---|---|
text |
Required | Text representation of a non-negative number in the stated base; up to 255 characters in the reference. | "FF" or text cell A3 |
radix |
Required | Integer base 2 through 36. | 2, 8, 16, 36 |
Both arguments are required; the official article documents no defaults. Its wording does not assign exact error codes for every invalid digit, non-integer radix, overflow or precision loss, so those remain native test cases. Official DECIMAL documentation.
Version, platform and locale applicability
Evidence scope (accessed 2026-10-13): ONLYOFFICE’s current, unversioned English function index and the function reference. The reference confirms the syntax shown above but does not identify the first supporting release. The Docs changelog and Desktop Editors changelog are separate histories; neither was used to infer that every old Desktop version implements this function. Release histories and promotional banners do not establish a tested function-by-version matrix.
- Docs web/server Spreadsheet Editor: described in the official shared Spreadsheet Editor help; no native web/server execution performed for this guide.
- Desktop Editors: same general editor documentation is available, but the exact minimum Desktop version and behaviour in the target installation remain unverified.
- Mobile and integrations: not tested; do not assume parity from the shared function article.
- English formula examples: begin with
=, use the English function name and comma-separated arguments. The Insert Function guide documents manual insertion. The Advanced Settings guide says formula language and region are configurable and that currency/decimal/grouping display can vary. Test translated function names, argument separators, region and numeric displays locally rather than assuming semicolons or comma decimals everywhere.
Practice worksheet: preserve the original base-encoded text
| Cell | Type | Enter exact characters | What it tests |
|---|---|---|---|
| A1 | Text | Base-encoded text | Header |
| A2 | Text | 1011 | Four binary digits |
| A3 | Text | FF | Hexadecimal FF |
| A4 | Text | 77 | Two octal digits |
| A5 | Text | Z | Base-36 letter |
| A6 | Text | 0010 | Keep leading zeros as text |
| A7 | Text | 19 | Deliberately invalid for base 8; used for error handling |
Type numeric-looking inputs such as 1011, 77 or 0010 as text, by formatting the input cells as Text before typing. This avoids discarding leading zeros or confusing decimal cell formatting with a base-encoded identifier.
Reproduce and validate these examples
- Open a blank worksheet and enter the input cells exactly as listed; preserve the difference between typed text and numeric or logical values. If an input must be text but looks numeric, format the input cell as Text before typing.
- Enter the examples in free output cells, using a leading
=. For formulas with more than one argument, use English comma separators in an English-formula configuration. - Compare the resulting values to the expected column. These expectations were checked from the official documentation and/or independent reasoning; none are results observed by running ONLYOFFICE.
- Log the ONLYOFFICE product, version/build, online versus Desktop edition, operating system, chosen formula language and regional settings alongside any discrepancy.
- Keep your source column; never overwrite original imported data until results are confirmed on your installation.
Worked formulas with independently checked results
| Output cell | Formula | Expected result | Positional-base reasoning |
|---|---|---|---|
B2 |
=DECIMAL(A2,2) |
11 | 1011₂ = 8+2+1 |
B3 |
=DECIMAL(A3,16) |
255 | FF₁₆ = 15×16+15 |
B4 |
=DECIMAL(A4,8) |
63 | 77₈ = 7×8+7 |
B5 |
=DECIMAL(A5,36) |
35 | Z maps to digit 35 |
B6 |
=DECIMAL(A6,2) |
2 | Binary text 0010 retains a numeric value of two |
B7 |
=DECIMAL("10",36) |
36 | Place-value demonstration for base 36 |
B8 |
=DECIMAL("1F",16) |
31 | One 16 plus fifteen |
B9 |
=DECIMAL("100",2) |
4 | One in the 2-squared place |
B10 |
=DECIMAL("12",3) |
5 | One times three plus two |
B11 |
=DECIMAL("ZAP",36) |
45745 | 35×36² + 10×36 + 25 |
B12 |
=DECIMAL("ABC",16) |
2748 | 10×16²+11×16+12 |
B13 |
=DECIMAL("0",2) |
0 | Zero in binary |
B14 |
=IFERROR(DECIMAL(A7,8),"Check digits") |
Check digits, if DECIMAL returns an error | 9 is invalid in radix eight; native error generation remains unverified |
The IFERROR demonstration is a conditional result: if an invalid base-8 digit generates a spreadsheet error as expected, the fallback text is displayed. The ONLYOFFICE DECIMAL article does not name that error code, so this guide does not promise a particular underlying code such as #NUM! or #VALUE!. DECIMAL; IFERROR.
Independent numeric cross-check
For "ZAP" in radix 36, treat Z=35, A=10 and P=25:
35 × 36² + 10 × 36¹ + 25 × 36⁰
= 35 × 1296 + 360 + 25
= 45,745
This calculation checks arithmetic independently of the spreadsheet editor; it does not establish how the editor handles unsupported characters or extreme-precision inputs.
Advanced applications
Validate a hexadecimal label while preserving the original code
Keep an incoming hexadecimal label such as FF in A3 and use =DECIMAL(A3,16) in a separate column. The expected numeric result is 255. Preserve the source code for traceability; converting to a number removes the original representation and any leading zeros.
Avoid hiding unexpected input mistakes
=IFERROR(DECIMAL(A7,8),"Check digits")
For source text 19, the digit 9 is not valid in radix 8, so the formula should present Check digits under standard positional-base interpretation and documented IFERROR behavior. The underlying error type must be verified natively; do not use a fallback blindly if downstream consumers need to distinguish invalid input from other failures.
Mixed-radix inventory imports
In a separate import worksheet with base indicator in B2, the general expression is =DECIMAL(A2,B2). Independently validate B2 as an integer in the range 2–36 and the digits of A2 against that base. Avoid treating decimal numbers already stored in A2 as base-coded text unless that is what the source schema specifies.
Limitations and troubleshooting
#VALUE!,#NUM!or unexpected errors: inspect each character intextand verify it belongs to the specified base; the ONLYOFFICE article does not give a complete per-error mapping.- Invalid or noninteger radix: the documented radix is an integer from 2 through 36. Do not assert acceptance of
1,37, non-integers or localized text values. - Strings longer than 255 characters: the official article limits the
textargument to 255 characters. Reject or stage them for separate handling. - Precision with extremely large values: spreadsheet numeric storage may be imprecise for large integers; ONLYOFFICE’s article does not state a precise safe-integer limit. An Excel limit does not establish an ONLYOFFICE limit; verify large values with an appropriate source and native test.
- Leading zeros vanish during import: store the original base-encoded identifier as text, then convert in a separate calculated column.
- Confusing hex
FFwith decimal 255: DECIMAL outputs a base-10 number. Do not overwrite the original textual code if users need to keep its encoding. - Lower-case letters and whitespace: Excel’s article describes letter-case-insensitive input; ONLYOFFICE’s short article does not explicitly state all case/whitespace rules. Test on target Docs and Desktop builds before asserting parity.
- Locale issues: standard function arguments use English commas in the examples, but the installation’s Formula Language may be localized; the positional-base digit alphabet is not the locale decimal separator.
Compatibility: ONLYOFFICE versus Excel
The Microsoft DECIMAL reference describes the same signature and a similar radix range. It additionally discusses case handling, maximum precision and possible Excel errors. Those Microsoft-specific behaviours are provided as comparisons, not as observed ONLYOFFICE behaviour; the authoritative ONLYOFFICE guarantees in this article are the syntax, stated text length and radix constraints. ONLYOFFICE DECIMAL.
Frequently asked questions
How do I convert a hex value to decimal? Put the hex string in a text cell and use =DECIMAL(A2,16). For literal text, =DECIMAL("FF",16) has the independently calculated expected result 255.
Is this the same as changing a cell’s number format? No. It interprets digits in a specified number base and returns a numeric value.
What radix should I use for binary? Use 2. For example, "1011" is 11 in decimal.
Can it parse thousands-separated numbers? That is a separate text-to-number task; use NUMBERVALUE with the appropriate separators instead.
Checked references (2026-10-13)
Verification limitations
Official syntax and limits were checked on 2026-10-13. Numerical examples are independent expectations. Native Desktop/web execution, localized parsing, error handling and historical release support remain untested.