跳到主要内容

LOG

Returns the logarithm of a number to the specified base.

Syntax

expression.LOG(arg1, arg2);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe positive real number for which the logarithm will be returned.
arg2OptionalApiRange | ApiName | numberThe logarithm base. If omitted, it is equal to 10.

Returns

number

Example

let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.LOG(56, 5));