Tuesday, 28 August 2012

VB.Net - Excel - How to hide column

'hide column
osheet.Range("L" & curLine).Columns.Hidden = True
Or
osheet.Range("H1").ColumnWidth = 0


Remember, the following line (with AutoFit) will unhide columns :
osheet.Range("A" & intHeaderLine, "BH" & curLine).EntireColumn.AutoFit()

No comments:

Post a Comment