跳到主要内容

SetRowHeight

设置以磅为单位的指定行高度。 一磅等于 1/72 英寸。

语法

expression.SetRowHeight(nRow, nHeight);

expression - 表示 ApiWorksheet 类的变量。

参数

名称必需/可选数据类型默认值描述
nRow必需number要设置高度的行号。
nHeight必需number以磅为单位的行高度。

返回值

此方法不返回任何数据。

示例

在电子表格中设置指定行的高度(以磅为单位)。

// How to resize the height of the row in a spreadsheet.

// Set row height for a worksheet in a spreadsheet.

let worksheet = Api.GetActiveSheet();
worksheet.SetRowHeight(0, 30);