跳到主要内容

SetPrintHeadings

设置是否随工作表一起打印行标题和列标题。

语法​

expression.SetPrintHeadings(bPrint);

expression - 表示 ApiPageSetup 类的变量。

参数​

名称必需/可选数据类型默认值描述
bPrint必需boolean指定是否打印行标题和列标题。

返回值​

boolean

示例​

在电子表格中随工作表内容一起打印行标题和列标题。

// How do I include row numbers and column letters on the printout in a spreadsheet?

// Show the row and column headings when printing a worksheet in a spreadsheet.

let worksheet = Api.GetActiveSheet();
let pageSetup = worksheet.GetPageSetup();
pageSetup.SetPrintHeadings(true);