Contact

OCT2DEC Function in ONLYOFFICE Spreadsheet Editor: Syntax and Worked Examples

Engineering Beginner ONLYOFFICE Spreadsheet Editor

Decode base-eight strings to decimal numbers with leading-zero preservation, reproducible calculations, documented #NUM! rules and compatibility cautions.

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 Octal Numerals to Decimal. Octal 10 represents eight in decimal, and octal 377 represents 255. OCT2DEC decodes these place values directly without asking you to mentally translate base-eight numbers. The exact English-reference syntax is =OCT2DEC(number), documented by the official ONLYOFFICE OCT2DEC function article (checked 2026-10-13 UTC). For octal 123, the arithmetic is 1×8² + 2×8 + 3 = 83 decimal. For 000123, leading zeros do not alter the integer, but they may matter when preserving an original identifier.

Verification: Results are independently calculated mathematical expectations. Native ONLYOFFICE Docs web or Desktop execution, localized parsing and runtime error capture were not performed.

Purpose, context and when to use OCT2DEC

OCT2DEC interprets a string of octal digits as a number in base eight and returns its decimal equivalent. This is useful for reading octal device values, file permission notation, and positional-notation lessons; only digits 0–7 belong to octal.

What the notation means

  • Decimal/base 10: each digit’s value is weighted by powers of 10.
  • Octal/base 8: valid digits are 0–7, weighted by powers of 8.
  • Hexadecimal/base 16: digits are 0–9 and letters A–F (A=10 through F=15), weighted by powers of 16.
  • A base conversion preserves the integer. Zero padding with places (when supported) changes the output’s character count, not the represented quantity.

For a cell containing an octal or hexadecimal identifier, format it as Text before typing any leading zeros. Literal strings in the formulas are wrapped in double quotation marks, e.g. "377" rather than a bare number assumed to be octal. The underlying reference does not exhaustively specify every numeric-to-text coercion; check the stored cell type when recreating this worksheet.

Exact documented syntax, arguments and defaults

=OCT2DEC(number)
Argument position Argument Requirement and type Meaning / documented default
1 number Required An octal number represented by valid base-eight digits. A quoted text literal or text-formatted cell preserves deliberate leading zeros.

There is no optional width argument. The documented function takes exactly one argument.

See the vendor’s documented syntax and notes; this function accepts one octal input and no width argument.

Reproducible worksheet: from source input to expected output

  1. In a new, otherwise empty worksheet, enter Scenario in A1 and Octal source (Text) in B1. Enter Calculated decimal in C1.
  2. Format column B as Text before filling it; this preserves base digits and leading zeros. For reproducibility, enter the B-column source values from the rows below without the article’s backtick punctuation.
  3. In C2 enter =OCT2DEC(B2) and fill through C21. There is no places argument.
  4. Compare the spreadsheet outputs to the independent expectations. If your installation differs, note the software edition and version, formula language, region, source cell type and entered formula. An expected result is not a claimed live test.
  5. Save the workbook with its sample values so a reviewer can repeat the comparison. To inspect a hidden leading zero, click the source cell and check the formula bar as well as the displayed cell.

Input and expected-output worksheet

Row Use case B: octal source (Text) C: independently expected decimal Decimal cross-check
2 Zero 0 0 0
3 One 1 1 1
4 Last single octal digit 7 7 7
5 Octal carry 10 8 8
6 After carry 11 9 9
7 Low nibble 17 15 15
8 Second octal digit 20 16 16
9 Five-bit value 37 31 31
10 Power of two 40 32 32
11 Six-bit maximum 77 63 63
12 Eight squared: 64 100 64 64
13 ASCII A magnitude 101 65 65
14 Small permission total 113 75 75
15 Example of 83 123 83 83
16 Seven-bit maximum 177 127 127
17 Eighth bit 200 128 128
18 Full byte 377 255 255
19 First two octal blocks 400 256 256
20 12-bit maximum 7777 4095 4095
21 16-bit maximum 177777 65535 65535

Independent calculation method: Parse the input numeral in its stated source radix using exact integer arithmetic, then format that same integer in the destination radix. For the fixed-width column, left-pad the resulting string with the digit 0 to the requested width. These computations were checked with a separate Python integer conversion routine. That routine is not an ONLYOFFICE interpreter; outputs and text handling must still be verified in an installed editor.

Direct formulas to paste in an empty cell

Formula Expected output (independent) Decimal cross-check
=OCT2DEC("10") 8 8
=OCT2DEC("17") 15 15
=OCT2DEC("113") 75 75
=OCT2DEC("123") 83 83
=OCT2DEC("245") 165 165
=OCT2DEC("377") 255 255
=OCT2DEC("7777") 4095 4095
=OCT2DEC("177777") 65535 65535
=OCT2DEC("0000000007") 7 7

Reproducibility note: Quoted numeral literals keep the source notation intact. Results that look like text codes should not be coerced to ordinary decimals when copied into another program. To preserve fixed-width output, ensure destination cells have appropriate formatting before downstream use; the exact returned cell type is a native-test question.

Advanced uses and worked applications

1. Read a byte

OCT2DEC interprets a string of octal digits as a number in base eight and returns its decimal equivalent. For this application enter =OCT2DEC("377"); the independently expected result is 255. Octal 377 = 3×64 + 7×8 + 7 = 255 decimal.

2. Permission numeral

OCT2DEC interprets a string of octal digits as a number in base eight and returns its decimal equivalent. For this application enter =OCT2DEC("755"); the independently expected result is 493. Octal 755 = 7×64+5×8+5 = 493 decimal. Permissions conventions must be interpreted separately from the numeric conversion.

3. First three octal places

OCT2DEC interprets a string of octal digits as a number in base eight and returns its decimal equivalent. For this application enter =OCT2DEC("123"); the independently expected result is 83. 123 octal is 83 decimal, not 123 decimal.

4. Leading zero label

OCT2DEC interprets a string of octal digits as a number in base eight and returns its decimal equivalent. For this application enter =OCT2DEC("0000000007"); the independently expected result is 7. 0000000007 has ten characters and represents 7, while an eleven-character variant is covered by the vendor documented #NUM! input-length rule.

5. Cross-base confirmation without rounding

=HEX2DEC(OCT2HEX("377")) → 255; =DEC2HEX(OCT2DEC("755")) → 1ED (mathematical expected values). These are independent compositions of documented functions, not formulas executed in ONLYOFFICE. Round-tripping is an excellent future desktop/web test, because it simultaneously probes coercion, function availability, and output text formatting. It is not evidence of behavior in any particular version.

6. Formula portability and identifiers

If using OCT2DEC for imported device codes, keep the original string and the converted string in separate columns. Add another column with the original base (8, 10 or 16) so downstream consumers do not interpret octal 377 as decimal 377. Retain the raw source when leading zeros or digit count carry meaning outside mathematics (for instance, a fixed-width external identifier).

Documented errors and troubleshooting

Only the rules explicitly attributed to the official OCT2DEC article are treated as vendor-established; the following error cases were not triggered in an actual ONLYOFFICE editor.

Formula Vendor-documented error category (not natively observed) Diagnosis
=OCT2DEC("128") #NUM! The source contains digit 8, which is not valid in base eight.
=OCT2DEC("89") #NUM! Neither digit belongs to the octal alphabet.
=OCT2DEC("00000000000") #NUM! Eleven input characters exceed the documented ten-character limit.

Source-rule summary

  • An unrecognized octal numeral produces #NUM! according to the official page.
  • An input numeral containing more than 10 characters produces #NUM! according to the official page.

Do not assume an outcome without checking the actual installed edition

  • The reference does not spell out the treatment of ten-digit signed octal values, decimal fractions, whitespace, prefixes, or output precision. Do not copy assumptions from a different spreadsheet application.
  • The guide deliberately avoids the ten-character signed boundary, apart from clearly labeled input-length text-preservation examples using leading zeros.

Practical troubleshooting sequence

  1. Verify the function name and argument count exactly against the official page. A one-argument-only function cannot take a width parameter.
  2. Verify the input base: octal uses 0–7; hexadecimal uses 0–9 and A–F; decimal is base 10. An apparently numeric cell might not contain the intended numeral representation.
  3. If a leading zero matters, change the source cell to Text before re-entering the value. Verify the formula bar retains it.
  4. If the function has places, first omit it to establish the shortest expected output mathematically; then enter a positive integer large enough for that output. A width counts characters, not bits or decimal places.
  5. For an unexpected error, record the exact formula, source type, locale and app version; inspect the vendor’s documented error rules before attributing it to a specific behavior.
  6. If passing values between multiple conversion functions, inspect whether the intermediate result is textual or numeric in that exact editor. Do not conclude success merely because formatting makes a number look plausible.

Cases requiring native compatibility checks

  • =OCT2DEC("7777777777") (signed boundary convention unknown).
  • =OCT2DEC(" 123 ") (whitespace trimming not documented).
  • =OCT2DEC(123) versus =OCT2DEC("123") (numeric/text coercion to inspect).
  • =OCT2DEC("0000000007") (mathematically 7, but specifically confirm ten-character handling in the target editor).

Platform, locale and release-specific cautions

This is documentation-based research for ONLYOFFICE Spreadsheet Editor, not a general Excel guide. The current function catalogue lists the function under Engineering; the English Insert Functions instructions show formulas beginning with = and (in their example grammar) comma-separated arguments. The ONLYOFFICE Advanced Settings help documents selectable formula languages and regional options. In other language/region setups, verify the localized function label, argument separator and decimal settings in the editor before pasting the English formula; no localized syntax was executed here.

Docs web vs Desktop Editors: ONLYOFFICE maintains Docs release notes separately from Desktop Editors release notes. The functions’ current online help is an unversioned reference, not a support matrix. Docs 10.0.0 is listed in its changelog dated 2026-10-10, while the Desktop changelog reviewed on 2026-10-13 has a separate version history. Neither checked changelog establishes a first-supported version for this specific base-conversion function. Accordingly, treat older Desktop, web installations and external file imports as not natively verified. No native execution, screenshot, runtime error capture, or edition-to-edition compatibility testing was performed for this manuscript.

The following links lead to official vendor references checked on 2026-10-13 UTC.

Verification and limitations

Check Status
Official OCT2DEC syntax, argument order and documented default Documentation-checked, 2026-10-13 UTC
Official error/length behavior Documentation-checked only for the rules stated above
Independent exact-integer examples Validated with a separate calculation, not native ONLYOFFICE
ALL native Desktop/web execution tests Not performed
Locale-specific syntax, exact runtime error captures, signed limit behavior Unverified
Old release capability and first-supported web/Desktop edition Not established

For any native compatibility check, record the edition, version, operating system/browser, formula language, region, source-cell type and actual observed output.