Skip to content

InchesToPoints (方法)

将度量单位从英寸转换为磅 (磅:指打印的字符的高度的度量单位。1 磅等于 1/72 英寸,或大约等于 1 厘米的 1/28。)。

参数

属性数据类型必填说明
Inchesdouble必填指定要转换为磅值的英寸值。

返回值

Double

示例

javascript
/*本示例将工作表 Sheet1 中的左边距设为 2.5 英寸。*/
function test() {
    Worksheets.Item("Sheet1").PageSetup.LeftMargin = Application.InchesToPoints(2.5)
}
javascript
/*本示例将4英寸转换为磅值并显示。*/
function test() {
    console.log(Application.InchesToPoints(4))
}