Get Started
Usage API
More information

SetHidden

SetHidden(isHidden)

Sets the value hiding property.

Parameters:

Name Type Description
isHidden bool

Specifies if the values in the current range are hidden or not.

Returns:

This method doesn't return any data.

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
var oRange = oWorksheet.GetRows("1:3");
oRange.SetHidden(true);
oWorksheet.GetRange("A1").SetValue("1");
oWorksheet.GetRange("B1").SetValue("2");
oWorksheet.GetRange("C1").SetValue("3");
var bHidden = oRange.GetHidden();
oWorksheet.GetRange("A4").SetValue("The values from A1:C1 are hidden: " + bHidden);
builder.SaveFile("xlsx", "SetHidden.xlsx");
builder.CloseFile();

Resulting document