Skip to content
本页内容

Log10 (方法)

返回以 10 为底的对数。

参数

属性数据类型必填说明
Arg1float必填Number - 要计算其以 10 为底的对数的正实数。

返回值

float

示例

python
#本示例使用 Log10 方法分别计算数值50和0.6以10为底的对数,并分别赋值给A4和A5单元格
def test():
    Range("A4").Value2 = WorksheetFunction.Log10(50)
    Range("A5").Value2 = WorksheetFunction.Log10(0.6)
python
#本示例为B1单元格赋值,使用 Log10 方法计算B1单元格的值以10为底的对数
def test():
    Range("B1").Value2 = 123
    print(WorksheetFunction.Log10(Range("B1").Value2))