跳到主要内容

SetDisplayHeadings

指定是否必须显示当前工作表的行/列标题。

语法

expression.SetDisplayHeadings(isDisplayed);

expression - 表示 ApiWorksheet 类的变量。

参数

名称必需/可选数据类型默认值描述
isDisplayed必需boolean指定是否必须显示当前工作表的行/列标题。默认值为 true

返回值

此方法不返回任何数据。

示例

此示例指定是否必须显示工作表的行/列标题。

// How to set whether sheet headings should be displayed or not.

// Set a boolean value representing whether to display row/column headings or not.

let worksheet = Api.GetActiveSheet();
worksheet.GetRange("A2").SetValue("The sheet settings make it display no row/column headers");
worksheet.SetDisplayHeadings(false);