Contact

OCT2DEC in WPS Spreadsheet: Interpret Base-Eight Imports and Signed Thirty-Bit Records

Engineering Intermediate WPS Spreadsheet

Decode octal text in WPS Spreadsheet, verify positional arithmetic and distinguish whole-record values from three separate digit fields.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: OCT2DEC interprets an octal string and returns its numeric value. =OCT2DEC("245") has independently expected result 165, because 2×64+4×8+5=165.

Availability and version history

  • Introduced: documented by 2019-06-24 in the official WPS lesson; the first release is not established.
  • Availability: Current WPS Windows documentation confirms this function. The historical lesson’s edition field is blank.
  • Scope: exact current supported builds and other WPS clients remain unverified.
  • Checked: October 14, 2026. Documentation and independent calculations; no native WPS execution.

Syntax and documented format

=OCT2DEC(number)

The WPS lesson describes at most ten octal characters, corresponding to thirty bits, and uses two’s-complement notation for negative inputs. Octal digits are 0–7; digits 8 and 9 do not belong to this base.

The historical lesson’s edition field is blank. A separate current official introduction documents OCT2DEC in WPS on Windows, without a precise minimum build. Those two facts remain separate; the current page does not retroactively identify the older lesson’s edition.

Use quoted strings or cells set to Text before entering codes. A decimal-looking digit sequence can represent a different quantity when interpreted in base eight.

Example 1: decode a reproducible import

Enter only the first column in A2:A7 as Text. Use =OCT2DEC(A2) in B2 and fill down.

A, octal text B, expected number
005 5
045 37
111 73
245 165
454 300
100 64

Octal 111 means 1×64+1×8+1=73. Octal 454 means 4×64+5×8+4=300. The initial zero in 045 changes its width, not its value.

Keep the source text if an export must reproduce three characters. Once 045 has become numeric 37, its original leading zero cannot be inferred from that quantity alone.

Example 2: show each positional contribution

For the explicit octal string 245, its digits are 2, 4 and 5. Independently check their contributions in three free cells:

=2*64
=4*8
=5

Expected contributions are 128, 32 and 5, totaling 165. These numeric helper formulas explain the three digit weights without relying on an unverified text-to-number coercion rule. They are independent controls for the stated input, not formulas that track a changing source cell.

This helper calculation is a model for exactly three characters. It is not a general parser for different lengths, prefixes or signed full-width inputs. The field specification determines the weights.

Advanced example: inspect thirty-bit signed values

For a full ten-character negative octal string, the documented two’s-complement model subtracts 1073741824, or 2^30, from the unsigned positional value.

String Independently expected number
777 511
3777777777 536870911
4000000000 -536870912
7777777773 -5
7777777777 -1

These are independent encoding controls, not observed native boundary tests. The short 777 is positive; at full width an initial octal digit 4–7 sets the highest of the thirty bits.

The same characters can have a different meaning under an external unsigned or differently sized record format. OCT2DEC cannot infer that external specification from the appearance of the digits.

Advanced check: preserve the quantity across bases

For octal 245:

=OCT2HEX("245",4)
=HEX2DEC(OCT2HEX("245",4))

Expected results are hexadecimal text 00A5 and numeric 165. The direct =OCT2DEC("245") should have the same independently expected numeric result. OCT2HEX changes representation; HEX2DEC interprets the new base.

Padding to four hex characters does not preserve the original octal width. Quantity equality and character-for-character equality are separate checks.

Separate fields are not automatically one quantity

If 245 describes three independent one-digit fields, their values are 2, 4 and 5, whose sum is 11. The complete positional quantity is 165. Neither replaces the other without knowing the intended data model.

Likewise, ordinary decimal arithmetic on the digits 245 uses decimal 245, not octal 165. Decode before arithmetic when the quantity represented by the code is what matters.

Invalid digits and remaining limits

The lesson documents #NUM! for an invalid octal number. “248” contains an invalid digit. Do not turn such a failure into an apparently legitimate zero without retaining an error flag.

More than ten characters is outside the stated input contract. Prefix handling, whitespace, numeric-text coercion beyond explicit strings and error precedence remain unverified. Keep the original code, its base and the intended sign width beside decoded results so another reader can reproduce the interpretation.

References and verification

Complete function-specific documentation reviewed. Worked outputs are independently calculated expectations, not captured native results. Formulas use English names and comma separators; check the installed locale. Product/client and source gaps retain their explicit scope.