跳到主要内容

SetPrintGridlines

指定是否必须打印当前工作表网格线。

语法

expression.SetPrintGridlines(bPrint);

expression - 表示 ApiWorksheet 类的变量。

参数

名称必需/可选数据类型默认值描述
bPrint必需boolean定义是否在此页面上打印单元格网格线。

返回值

此方法不返回任何数据。

示例

指定电子表格中工作表网格线是否必须打印。

// How to set whether sheet gridlines should be printed or not in a spreadsheet.

// Set a boolean value representing whether to print gridlines or not in a spreadsheet.

let worksheet = Api.GetActiveSheet();
worksheet.SetPrintGridlines(true);
worksheet.GetRange("A1").SetValue("Gridlines of cells will be printed on this page: " + worksheet.GetPrintGridlines());