Contact

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

Engineering Beginner ONLYOFFICE Spreadsheet Editor

ONLYOFFICE OCT2BIN function guide: exact official formula syntax, argument defaults, practical octal to binary examples, width handling, error conditions, edition cautions and sources.

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

Convert an octal (base-8) numeral into binary (base-2) digits. An octal digit corresponds to a group of three binary bits. The documented formula is =OCT2BIN(number, [places]). For example, =OCT2BIN("55") has the independently calculated expected result 101101, while =OCT2BIN("55",8) has the expected result 00101101. See the official OCT2BIN reference, checked 2026-10-13 (UTC).

Evidence boundary: Every displayed output is an independent mathematical expectation unless labelled as a vendor-documented error rule. Native ONLYOFFICE Docs web or Desktop execution, localized parsing and historical-edition regression tests were not performed. Hexadecimal expectations use uppercase letters; native letter casing and cell formatting are not asserted.

What OCT2BIN does—and when to use it

Convert an octal (base-8) numeral into binary (base-2) digits. An octal digit corresponds to a group of three binary bits. This changes how an integer is represented; it does not rescale a measurement. As an example, decimal 45 can be written as binary 101101, octal 55, or hexadecimal 2D. Preserving fixed-width identifiers requires the optional places argument and careful cell formatting. The ONLYOFFICE function catalogue lists OCT2BIN in Engineering functions.

Use OCT2BIN when inspecting machine-generated flags, converting educational number-system examples, normalizing old identifiers, or preparing a fixed-width code for human inspection. It is not documented as a general parser for signed binary protocols, fractional numbers, textual prefixes like 0x, or arbitrary-length cryptographic bit fields. Those behaviors are not established by the linked function description.

Exact vendor syntax, arguments, types and defaults

=OCT2BIN(number, [places])
Position Argument Required? Official meaning Documented default / limitation
1 number Yes The octal (base 8) numeral, supplied directly or by cell reference. The official help article requires a recognized base-8 numeral of 10 characters or fewer. Its full signed/large-number behavior is not specified.
2 places No Desired count of digits in the binary (base 2) result. If omitted, the function uses the minimum number of digits. If specified, it must be positive and large enough for the result, or the article documents #NUM!.

Square brackets mark an optional parameter and are not entered literally. In the English-language reference, the first argument is always number; the optional second is places. Use parentheses and an initial = in a real spreadsheet formula. The official Insert functions guide illustrates comma-separated arguments; note that Advanced Settings offers formula-language and regional controls. Do not assume that a formula copied unchanged between localized editors always parses the same way.

Text input matters. Enter a base representation such as 00000101 as Text in cell B, or quote it as "00000101" inside a formula. Ordinary numeric auto-formatting can remove leading zeros before conversion. For a hexadecimal input containing A–F, quote the literal or store it in a text cell rather than treating it as a decimal numeric token. Upper/lowercase, leading/trailing spaces, signed inputs, noninteger places, and imported-type coercion should be confirmed in the target ONLYOFFICE edition; the checked reference is not an exhaustive behavior matrix.

Reproducible worksheet: 16 inputs and both output widths

  1. Open a blank ONLYOFFICE spreadsheet. Put Use case in A1, Source octal (base 8) in B1, Places in C1, Minimum output in D1, and Padded output in E1. Use these columns on an otherwise empty worksheet.
  2. Format B2:B17 as Text before entering the source strings. Copy each source value from the table into B2:B17, preserving any leading zeros. Enter 8 into every C2:C17 cell. Do not type the backticks displayed in the article.
  3. In D2 enter =OCT2BIN(B2); in E2 enter =OCT2BIN(B2,C2). Copy or fill both formulas through row 17. The source B and width C references will follow each row.
  4. Compare the two result columns against the independently calculated expectations. Preserve the source values and record any differences with the Desktop/web edition, installed version, formula language, and region. The article does not imply these results were personally observed in ONLYOFFICE.
  5. If a value contains leading zeroes, inspect the formula bar and the cell type. If the minimum-width column lacks zeros but the padded column has them, that is the intended mathematical width distinction, not proof that a given editor preserves them as text.
Row Source B (Text) Places C D: expected minimum E: expected padded
2 0 8 0 00000000
3 1 8 1 00000001
4 2 8 10 00000010
5 7 8 111 00000111
6 10 8 1000 00001000
7 12 8 1010 00001010
8 17 8 1111 00001111
9 20 8 10000 00010000
10 31 8 11001 00011001
11 52 8 101010 00101010
12 100 8 1000000 01000000
13 177 8 1111111 01111111
14 200 8 10000000 10000000
15 255 8 10101101 10101101
16 377 8 11111111 11111111
17 0007 8 111 00000111

Independent check: Convert each B value from base 8 to an exact integer and then render it in base 2. D is the minimal-width representation. E is that representation left-padded with zeroes to width 8. This is arithmetic verification, not a native spreadsheet test.

Copy-and-paste formula examples

The following literals do not require setting up the input table. Keep quotes around the input numeral so that intended leading zeros and hexadecimal letters are represented as text.

Formula Independent expected output Decimal value for checking
=OCT2BIN("12") 1010 10
=OCT2BIN("12",8) 00001010 10
=OCT2BIN("55") 101101 45
=OCT2BIN("55",8) 00101101 45
=OCT2BIN("377") 11111111 255
=OCT2BIN("377",8) 11111111 255
=OCT2BIN("0007",8) 00000111 7
=OCT2BIN("0",8) 00000000 0

The leading-zero strings are digit sequences, not decimal fractions. Changing places adds output zeros on the left, without changing the numeric value represented. For important reports, inspect the actual stored cell value, not only the displayed number format.

Advanced and practical applications

Decode an old-style octal permissions byte

Octal 55 corresponds to decimal 5 × 8 + 5 = 45, binary 101101. =OCT2BIN("55",8) independently gives 00101101. This is a base-conversion illustration; do not mistake the result for a Unix permissions parser.

Check a byte maximum

Octal 377 is decimal 255 and binary 11111111. =OCT2BIN("377",8) is mathematically 11111111. The eight-digit width is requested explicitly.

Round-trip via BIN2OCT

=BIN2OCT(OCT2BIN("125",8)) independently yields 125 because octal 125 = decimal 85. Both conversion formulas require native evaluation before this is treated as a verified editor result.

Compare with decimal conversion

=DEC2BIN(OCT2DEC("52"),8) independently yields 00101010: octal 52 = decimal 42. The observed result may depend on version and input coercion, which have not been tested.

Errors, limits and troubleshooting

The official OCT2BIN article explicitly documents #NUM! if the numeral is not recognized in its stated base, if it has more than 10 characters, if the converted output needs more digits than places, or if places is less than or equal to 0. These are documentation claims, not a report of observed screen output. The following cases illustrate each published rule:

Formula to check Vendor-documented expected error class Why
=OCT2BIN("8") #NUM! according to the official documented rule; not natively observed Invalid source-base input: digit 8 is not allowed in base 8.
=OCT2BIN("00000000000") #NUM! according to the official documented rule; not natively observed 11-character source numeral; the official page limits number to at most 10 characters.
=OCT2BIN("377",7) #NUM! according to the official documented rule; not natively observed The requested width is shorter than the independently determined converted numeral.
=OCT2BIN("1",0) #NUM! according to the official documented rule; not natively observed The official page says places less than or equal to zero returns #NUM!.
=OCT2BIN("1",-1) #NUM! according to the official documented rule; not natively observed A negative places value is also less than or equal to zero.

Important distinction: A mathematical conversion tool can evaluate arbitrarily long positive integers, but the ONLYOFFICE reference states a 10-character input limit. Do not claim that an arbitrarily long integer, a 10-digit negative representation or a large signed value is supported merely because Python or another spreadsheet program calculates it.

Troubleshooting sequence

  1. Confirm the input base: Octal (base 8) only uses digits 0 through 7. Check whether the cell holds the exact string, especially after CSV import. Remove prefixes and separators unless validated against a native build.
  2. Inspect the input length: more than ten characters is an official #NUM! condition. The page does not resolve sign-bit behavior for every value within ten characters; use positive examples with clear bit length for initial troubleshooting.
  3. Check output width: omit places to get the minimum-width representation. With places, use a positive width that fits all converted digits; shorter requests are documented to produce #NUM!.
  4. Verify entry language and punctuation: use the named function found in the editor’s Formula tab. English documentation uses commas; Advanced Settings lists a configurable formula language and regional settings. If the editor rejects a formula, check its active settings instead of blindly changing functions.
  5. Check text versus number types: protect significant leading zeros in the source. Check the actual result as a character sequence if your data exchange depends on fixed length. Do not treat a formatted-looking identifier as a numeric quantity.
  6. Isolate one cell: try =OCT2BIN("55") and compare with its independent expectation 101101 before nesting formulas. Save the workbook version, software build and locale when reporting a difference.

Boundaries that still require native validation

The English vendor article does not establish a complete table of allowed signed ranges, ten-character negative/two’s-complement interpretations, maximum practical places width, fractional-width coercion, hexadecimal letter case, whitespace handling, or specific spreadsheet error labels beyond its stated #NUM! cases. Large values can exceed the binary result length of a positive ten-bit number even when the input is within ten characters. Check those cases in the target edition before relying on them.

Version, edition and compatibility notes

The current unversioned ONLYOFFICE Docs Insert Functions catalogue lists OCT2BIN. The Docs changelog and Desktop Editors changelog are separate histories, so the existence of the help article does not establish that this function behaves identically in all web and desktop editions. The visible Docs changelog lists 10.0.0 (October 10, 2026) and the Desktop changelog lists 9.4.0 (May 19, 2026); these are product release dates, not function-introduction dates. The first supported release for OCT2BIN was not established during this review.

The documented English syntax uses comma argument separators. ONLYOFFICE Advanced Settings describes both Formula Language and Region; interface translations and regional numeric display may differ from these sample expressions. Formula interoperability with Excel, LibreOffice, Google Sheets, historical releases or third-party converters is not inferred from ONLYOFFICE documentation. Use an actual test sheet in each target product before promising equal behavior, particularly for negative codes, fixed width or unusual invalid inputs.

Frequently asked questions

Why did the leading zeros disappear? With places omitted, ONLYOFFICE’s official syntax description says the result uses the minimum required digits. Use a fitting positive places value to request a fixed width and keep the source identifier in a text-formatted cell.

Does OCT2BIN work for negative inputs? This review does not establish the interpretation of ten-character sign-bit or signed encodings in each edition. The official article documents input recognition and length but does not provide a complete negative-value behavior matrix. Native testing is required before asserting a particular output.

Can I use a 12-character code? The vendor specifically documents a #NUM! condition for more than ten characters. Use a different verified conversion method for longer codes and document its separate limitations; do not bypass the limit by assuming all base-conversion functions share the same range.

How can I tell whether a conversion is right? Check the base-8 positional weights to derive the exact decimal value, then divide that integer by base 2 to reconstruct the output digits. Use the independent expected table above as a control, and confirm results in your specific editor build before deployment.

Claim-level sources, date and editorial verification

Claim Vendor source Checked
Function purpose, exact number, [places] syntax, optional default Official OCT2BIN help 2026-10-13 UTC
Input-recognition, ten-character limit, too-small/invalid places, #NUM! rule Official OCT2BIN help 2026-10-13 UTC
Engineering category and instructions for entering function formulas Spreadsheet Editor Insert Functions 2026-10-13 UTC
Formula language and region settings Advanced Settings 2026-10-13 UTC
Web/Docs release chronology not first support date Docs changelog 2026-10-13 UTC
Desktop release chronology not first support date Desktop changelog 2026-10-13 UTC

Verification limitations: Exact integer arithmetic verifies the positive examples. Error descriptions follow the vendor documentation; runtime errors, localized input and cross-edition compatibility have not been natively tested.