跳到主要内容

SetDisplayGridlines

Specifies whether the current sheet gridlines must be displayed or not.

Syntax

expression.SetDisplayGridlines(isDisplayed);

expression - A variable that represents a ApiWorksheet class.

Parameters

NameRequired/OptionalData typeDefaultDescription
isDisplayedRequiredbooleanSpecifies whether the current sheet gridlines must be displayed or not. The default value is -true.

Returns

This method doesn't return any data.

Example

This example specifies whether the sheet gridlines must be displayed or not.

let worksheet = Api.GetActiveSheet();
worksheet.GetRange("A2").SetValue("The sheet settings make it display no gridlines");
worksheet.SetDisplayGridlines(false);