跳到主要内容

BIN2OCT

Converts a binary number to octal.

Syntax

expression.BIN2OCT(arg1, arg2);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe binary number which will be convertrd.
arg2OptionalApiRange | ApiName | numberThe number of characters to use.

Returns

number

Example

let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.BIN2OCT(1110011100, 4));