DEC2OCT in Collabora Office: Create Octal Text and Preserve Three-Bit Field Boundaries
Convert decimal numbers to octal text in Collabora Calc, use explicit padding and independently check positional weights and thirty-bit negative models.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: DEC2OCT converts a number into octal text. For example, =DEC2OCT(42;3) has independently expected string 052. The output uses digits 0–7 and an explicitly chosen width in the examples below.
Availability and version history
- Introduced: the original Collabora release and launch date are not established by the reviewed sources.
- Availability: documented in Collabora Office 26.04 desktop help.
- Platform scope: online and mobile deployment support is not inferred from the desktop documentation.
- Checked: October 14, 2026. Function-specific documentation and independent controls; no native Collabora execution.
Syntax and documented scope
=DEC2OCT(Number [; Places])
Number is the quantity to convert. Places, an optional argument, specifies the output positions. The short Collabora section does not state its omitted default, the complete numeric admission interval, fractional handling or exact native errors.
For a negative Number, the section says the result has ten octal characters, corresponding to thirty bits, with a sign bit. The related OCT2DEC section supplies the two’s-complement convention used for this guide’s independent negative models.
Octal is base eight. Its positional weights are 1, 8, 64, 512 and so on; octal 100 represents decimal 64, not decimal 100.
Example 1: display a numeric column in base eight
Enter 0, 7, 8, 42, 100 and 511 in A2:A7. In B2 enter =DEC2OCT(A2;3) and fill through B7.
| Decimal number | Expected three-character octal text |
|---|---|
| 0 | 000 |
| 7 | 007 |
| 8 | 010 |
| 42 | 052 |
| 100 | 144 |
| 511 | 777 |
For 42, the calculation is 5×8+2=42. For 100, it is 1×64+4×8+4=100. For 511, it is 7×64+7×8+7=511.
In C2 put =OCT2DEC(B2) and fill down. Expected numeric outputs recover the six original values. The decoder does not recover the fact that you requested three characters; preserve that separately if it is part of the specification.
Example 2: compare representation widths
Evaluate these formulas in separate free cells:
=DEC2OCT(100;3)
=DEC2OCT(100;4)
=DEC2OCT(100;6)
Expected strings are 144, 0144 and 000144. The middle formula is the source’s documented example. All three describe the same number.
Extra zeros can make a column easier to inspect or meet a record layout. They do not multiply the quantity, add information about its origin or make an out-of-contract input valid.
Advanced example: assemble three small independent fields
A fictional data format assigns one octal digit to each of three integer fields, each restricted to 0 through 7. Put 5, 2 and 6 in E2:G2.
=DEC2OCT(E2;1)&DEC2OCT(F2;1)&DEC2OCT(G2;1)
Expected text is 526. Its complete positional value is:
=E2*64+F2*8+G2
Expected result: 342. =DEC2OCT(342;3) gives the same expected three-character representation.
For fields 0, 0 and 7, the construction gives 007, whose numeric value is 7. The zeros are essential to preserve all three fields. A value of 8 would violate the one-digit field design; conversion is not a substitute for that validation.
Negative numbers and the thirty-bit model
Under the documented ten-character output and the paired decoder’s two’s-complement interpretation:
| Number | Add 2^30 | Independently expected octal string |
|---|---|---|
| -1 | 1073741823 | 7777777777 |
| -2 | 1073741822 | 7777777776 |
| -42 | 1073741782 | 7777777726 |
Use =DEC2OCT(-42) as the proposed native reproduction of the last row. The table is an independently calculated model, not an observed application result. Negative-output padding interactions and admission endpoints are not certified by these controls.
Ten octal characters hold thirty bits, while ten binary characters hold ten bits. The similarly named DEC2BIN therefore describes a different fixed-width format.
Interpretation and errors
Keep numeric source values beside the strings. Summing decimal 144 would use the wrong quantity if that text was meant to represent octal 144, or decimal 100. Use OCT2DEC for the explicit decoding step.
The reference leaves omitted Places, fractional arguments, too-small widths, invalid types and exact error codes unstated. Those remain unverified here. The positive examples deliberately use sufficient widths and integers so their positional mathematics is independently reproducible without assuming another product’s coercion policy.
References and verification
- Collabora Office 26.04: DEC2OCT.
- Collabora Office 26.04: paired OCT2DEC signed-input convention.
- Editorial testing standards.
Complete function-specific documentation reviewed. Outputs are independently calculated positional models or explicitly documented controls, not captured native application results. Formulas use English names and semicolon separators; optional-argument brackets describe syntax and are not typed into a working formula.