You can choose whether to hide or show rows and columns in a worksheet by using the Hidden property of the IRange interface.
Refer to the following example code in order to hide specific rows and columns in a worksheet.
C# |
Copy Code |
---|---|
worksheet.Range["E1"].Value = 1; //Hide row 2:6 using the Hidden property worksheet.Range["2:6"].Hidden = true; //Hide column A:D using the Hidden property worksheet.Range["A:D"].Hidden = true; |