跳到主要内容

PointsToInches

将磅转换为英寸。

语法

expression.PointsToInches(pt);

expression - 表示 Api 类的变量。

参数

名称必需/可选数据类型默认值描述
pt必需number要转换为英寸的磅数。

返回值

number

示例

此示例展示如何将磅转换为英寸。

const points = 1000;
const inches = Api.PointsToInches(points);
const text = points + ' points are equal to ' + inches + ' inches.';

let worksheet = Api.GetActiveSheet();
worksheet.GetRange('B2').SetValue(text);