[Table of Contents] [docx version]
SpreadsheetML Reference Material - Table of Contents
DEC2OCT ( number [ , num-oct-digits ] )
Description: Makes the octal equivalent of number, with the result having num-oct-digits digits.
Arguments:
Name |
Type |
Description |
number |
number |
The decimal number that is to be converted to an octal string. |
num-bin-digits |
number |
The number of digits in the result, with leading zeros added as necessary. However, if number is negative, num-oct-digits is ignored and the result has 10 digits. If num-oct-digits is omitted, the minimum number of digits is used in the result. num-oct-digits is truncated to an integer. |
Return Type and Value: text – The octal equivalent of number using twos-complement representation with the left-most bit (30th bit from the right) representing the sign bit.
However, if
• number is outside the range -536,870,912 (4000000000 octal) to 536,870,911 (3777777777 octal), inclusive, #NUM! is returned.
• number needs more digits that num-oct-digits, #NUM! is returned.
• num-oct-digits ≤ 0 or > 10, #NUM! is returned.
[Example:
DEC2OCT(23) results in 27
DEC2OCT(-256) results in 7777777400
DEC2OCT(18,7) results in 0000022
end example]