跳到主要内容

DECIMAL

Converts a text representation of a number in a given base into a decimal number.

Syntax

expression.DECIMAL(arg1, arg2);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | stringThe number to convert. The string lenght must be less than or equal to 255 characters.
arg2RequiredApiRange | ApiName | numberThe base Radix of the number that is converting. An integer greater than or equal to 2 and less than or equal to 36.

Returns

number

Example

let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.DECIMAL(101, 2));