Contact

DEC2BIN Function in ONLYOFFICE Spreadsheet Editor: Syntax, Examples and Troubleshooting

Engineering Beginner ONLYOFFICE Spreadsheet Editor

Learn DEC2BIN in ONLYOFFICE Spreadsheet Editor: convert decimal integers to binary digits, vendor syntax, reproducible spreadsheet examples, advanced uses, errors, version/locale caveats and official references.

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

Represent a nonnegative whole-number quantity with binary digits; the optional places argument adds left-hand zeros for fixed-width output. The formula is =DEC2BIN(number, [places]) according to the ONLYOFFICE DEC2BIN help article. All worked outputs below are mathematical expectations obtained independently; none is an observed result from a running copy of ONLYOFFICE.

What DEC2BIN does

Represent a nonnegative whole-number quantity with binary digits; the optional places argument adds left-hand zeros for fixed-width output. Each binary position is worth a power of 2, counted from the right (1, 2, 4, 8, 16, …). The official function reference categorizes DEC2BIN as an engineering function.

This is a base conversion, not a change to a worksheet’s number formatting. Keep original values alongside their converted equivalents so readers can audit the conversion. The expected results are text-style base digits, not ordinary decimal numeric values. In the independent comparison, uppercase A–F is conventional for hexadecimal, but vendor output casing has not been natively checked.

Official syntax, argument order, types and defaults

=DEC2BIN(number, [places])
Argument Required? Type/input Default Meaning and cautions
number Required Decimal numeric value / cell containing a number — Use nonnegative whole numbers in the documented examples; published reference does not enumerate its entire integer range.
places Optional Number of binary digits to display Minimum number of digits when omitted For examples, use a positive whole number at least as large as the unpadded representation.

The argument order is required number followed by optional places. The brackets around optional parameters in documentation are syntax notation; do not type square brackets into your worksheet. Exact source: ONLYOFFICE DEC2BIN function, checked 2026-10-13.

Use only small, nonnegative whole numbers in these examples; the official page does not establish the full signed input range. Decimal-base integers are not automatically binary or hexadecimal strings just because they contain digit characters. A quoted formula literal such as "1010" prevents loss of leading zeros in the expression; cell data may require Text formatting. Do not assume that text coercion, whitespace, lowercase input, signed encodings, or fractional inputs behave exactly like Excel or another editor.

Reproduce the worksheet step by step

  1. Open a blank spreadsheet in the editor you plan to support and create headers A1 = Use case, B1 = Input, C1 = Formula / result. Treat these columns as a self-contained audit worksheet.
  2. Enter B2:B17 as ordinary nonnegative integer values, not as quoted strings. For a fixed-width representation, add a separate width column and use the places argument as shown later.
  3. Type the source values in column B exactly as shown. In C2, enter =DEC2BIN(B2), and then fill down through C17. Verify the function name using the editor’s Formula tab, Insert Function dialog or Shift+F3, as described in the official formula-entry guide.
  4. Compare displayed values against the independent mathematical expectations below. Record the program edition, version, operating system and formula language if native results differ; this manuscript contains no native execution data.
  5. Keep the unconverted column unchanged so that original inputs remain available for comparison.
Row Use case (A) Input (B) Formula for C Independent expected C
2 Zero value 0 (Number) =DEC2BIN(B2) 0
3 Flag enabled 1 (Number) =DEC2BIN(B3) 1
4 Two units 2 (Number) =DEC2BIN(B4) 10
5 Three units 3 (Number) =DEC2BIN(B5) 11
6 Five units 5 (Number) =DEC2BIN(B6) 101
7 Eight units 8 (Number) =DEC2BIN(B7) 1000
8 Ten units 10 (Number) =DEC2BIN(B8) 1010
9 Fifteen units 15 (Number) =DEC2BIN(B9) 1111
10 Sixteen units 16 (Number) =DEC2BIN(B10) 10000
11 Thirty-one units 31 (Number) =DEC2BIN(B11) 11111
12 Forty-two units 42 (Number) =DEC2BIN(B12) 101010
13 Sixty-four units 64 (Number) =DEC2BIN(B13) 1000000
14 One hundred 100 (Number) =DEC2BIN(B14) 1100100
15 Seven low bits 127 (Number) =DEC2BIN(B15) 1111111
16 Alternating pattern 170 (Number) =DEC2BIN(B16) 10101010
17 Full byte 255 (Number) =DEC2BIN(B17) 11111111

Ready-to-paste formulas

The following use literal inputs rather than cell references. Quotes mark a base representation as text where applicable; the expected results are calculated independently using powers of the base.

Formula Independent expected result
=DEC2BIN(0) 0
=DEC2BIN(1) 1
=DEC2BIN(2) 10
=DEC2BIN(3) 11
=DEC2BIN(5) 101
=DEC2BIN(8) 1000
=DEC2BIN(10) 1010
=DEC2BIN(15) 1111
=DEC2BIN(16) 10000
=DEC2BIN(31) 11111
=DEC2BIN(42) 101010
=DEC2BIN(64) 1000000
=DEC2BIN(100) 1100100
=DEC2BIN(127) 1111111
=DEC2BIN(170) 10101010
=DEC2BIN(255) 11111111

Mathematical verification method: For conversion to decimal, evaluate the position weights in base 2 or 16. For conversion from decimal, repeatedly divide by the target base and read remainders from right to left (or equivalently compute the exact integer base representation). For text width, add leading zeros without changing the magnitude. These are not tests executed by ONLYOFFICE.

Optional width: second argument (places)

The official help describes places as a display width; omitted means the minimum width. These examples use values for which the requested width can contain all digits. The zero padding is on the left, never on the right. The table is an independently calculated expectation, not proof of a particular edition’s padding behaviour.

Decimal input Places Formula Expected text-style representation
0 4 =DEC2BIN(0,4) 0000
3 5 =DEC2BIN(3,5) 00011
5 8 =DEC2BIN(5,8) 00000101
10 8 =DEC2BIN(10,8) 00001010
15 8 =DEC2BIN(15,8) 00001111
31 8 =DEC2BIN(31,8) 00011111
42 8 =DEC2BIN(42,8) 00101010
64 8 =DEC2BIN(64,8) 01000000
100 8 =DEC2BIN(100,8) 01100100
255 8 =DEC2BIN(255,8) 11111111

If the chosen width cannot hold the conversion, do not assume a specific error code unless the version’s official documentation or native test establishes it. The vendor specifically confirms #NUM! for places <= 0; other width limits require testing.

Advanced applications and real-world interpretation

Fixed-width inventory flags

If A2 contains 45, the formula =DEC2BIN(A2,8) independently yields 00101101. Eight characters can be used to show eight positions even though the numeric value requires only six binary digits.

Build a value-by-value conversion column

Keep decimal counts in A2:A17 and use =DEC2BIN(A2) in B2, copying downward. Store labels separately. A number with a binary appearance should not replace your original decimal count; retaining both helps audit conversions.

Round-trip independently

=BIN2DEC(DEC2BIN(45,8)) mathematically returns 45. This uses two official functions, but the nested formula is not an observed ONLYOFFICE test and may expose differences on signed/boundary values.

Alternative with BASE

=BASE(45,2,8) should represent the same positive integer and width mathematically, 00101101. BASE has a separately documented input range and base/radix argument, so do not substitute BASE to assert DEC2BIN handles larger values.

Errors, edge cases and troubleshooting

Symptom / diagnostic formula Evidence-based explanation and action
=DEC2BIN(5,0) #NUM! when places is zero; explicitly documented.
=DEC2BIN(5,-2) #NUM! when places is negative; explicitly documented.
Formula name is not available Check the function search under Formula > Insert Function for the installed edition; the current online help catalogue alone is not proof of support in an old build. See official function entry.
Formula is displayed instead of a computed value Confirm the leading =, cell type and Show Formulas setting; use the editor’s Formula tab or the Function Arguments wizard. Vendor’s function-entry instructions.
Wrong zeros, unexpected text or unintended formatting Confirm inputs were stored as intended, especially leading zeros; inspect quotes, numeric display format and the optional width, if applicable. Compare the underlying value separately from the displayed representation.
Locale-specific parsing or unknown function The English examples use function names and commas from the official syntax entry; verify the installed formula language and regional separators under Advanced Settings.

Do not infer undocumented limits. The official help does not supply a full signed-number range, fractional-input policy, or all too-small/too-large places outcomes. Examples deliberately use nonnegative integers at most 255; negative, fractional, and boundary cases require native version-specific verification. If a value is outside the clearly covered range, record it as needs native validation, not as a verified ONLYOFFICE output or an assumed error message. Invalid input can produce different errors depending on the case; this guide only attributes #NUM! to cases that the vendor explicitly documents.

Compatibility, languages, versions and editions

  • Current reference scope: The official English, unversioned ONLYOFFICE Spreadsheet Editor catalogue lists DEC2BIN. The Insert Function documentation explains both typing formulas and choosing them from the function wizard. This is documentation confirmation, not a runtime test.
  • Web/Docs versions: The ONLYOFFICE Docs changelog lists Docs 10.0.0, released 2026-10-10. This is the release context checked on 2026-10-13; it does not prove DEC2BIN was introduced then, nor establish its first-supported version.
  • Desktop versions: The distinct ONLYOFFICE Desktop Editors changelog lists Desktop 9.4.0, released 2026-05-19 at the time of research. Desktop and web deployment version numbers cannot be interchanged. This source does not establish this function’s first Desktop release.
  • Historical releases and editions: No full historical execution matrix was available. Do not claim working support in older Docs/Desktop builds or specific editions without a vendor release note or directly recorded native test.
  • Locale and syntax: The Advanced Settings instructions say formula language and regional settings are configurable. The function-entry guide uses English names and comma argument separators. Localized function names, decimal separators, accepted text coercions, and display formatting have not been checked in a live editor.
  • Excel/Sheets/LibreOffice compatibility: This page makes no execution claim about those products. Their formats, sign rules, size limits and error behaviour cannot substitute for ONLYOFFICE verification.

Related ONLYOFFICE function documentation: BIN2DEC, DEC2HEX, BASE, DECIMAL. These vendor links were individually opened/checked on 2026-10-13.

For a base-independent representation, ONLYOFFICE documents BASE (number, radix, optional minimum length). For reading a text numeral in a specified radix, it documents DECIMAL (text, radix). These are related mathematical tools, not proof that their parameter limits or sign conventions equal those of DEC2BIN.

Sources and verification

Claim Authoritative source Verified on Evidentiary limit
Function purpose, name and exact argument order Official DEC2BIN reference 2026-10-13 Unversioned English documentation, not native testing
Documented #NUM! conditions in the error table Official DEC2BIN reference 2026-10-13 Only its expressly described situations; no invented error matrix
Formula wizard, leading equals sign, example separator Official Insert Function guide 2026-10-13 User-interface instructions, not a test of every locale
Formula language and regional display/input settings Official Advanced Settings 2026-10-13 Configuration guidance; no localized runtime test
Docs 10.0.0 release date Official Docs changelog 2026-10-13 Product release context only; not first function support
Desktop 9.4.0 release date Official Desktop changelog 2026-10-13 Product release context only; not first function support
Numerical values throughout this page Independent positional-value arithmetic and exact integer radix conversion 2026-10-13 Not results observed in ONLYOFFICE

Verification limitations: Native execution in Desktop or Docs web, localized formula entry, quote/text coercion, signed boundaries and runtime error capture were not performed. Check these cases in the intended version before relying on them.