跳到主要内容

SetRowHeight

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

语法

expression.SetRowHeight(nRow, nHeight);

expression - 表示 ApiWorksheet 类的变量。

参数

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

返回值

boolean

示例

修改电子表格中的行高以提高可见性。

// How do I resize a row to be taller or shorter in a spreadsheet?

// Set the vertical dimension of a row to match your content needs in a spreadsheet.

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