TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

SetDisplayGridlines

SetDisplayGridlines(isDisplayed)

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

Parameters:

Name Type Description
isDisplayed boolean

Specifies whether the current sheet gridlines must be displayed or not. The default value is true.

Returns:

This method doesn't return any data.

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
oWorksheet.GetRange("A2").SetValue("The sheet settings make it display no gridlines");
oWorksheet.SetDisplayGridlines(false);
builder.SaveFile("xlsx", "SetDisplayGridlines.xlsx");
builder.CloseFile();

Resulting document