Table of Contents

Method SetColumnHidden

Namespace
DocWright.Spreadsheet
Assembly
DocWright.Spreadsheet.dll

SetColumnHidden(int, bool)

Hides or shows a column, as Excel's Hide and Unhide do. Its width is kept.

public void SetColumnHidden(int column, bool hidden)

Parameters

column int

The one-based column.

hidden bool

Whether the column is hidden.

Remarks

A column given a width of zero (SetColumnWidth(int, decimal)) stays hidden until it is given a width.

Exceptions

ArgumentOutOfRangeException

The column is outside the worksheet grid.

InvalidOperationException

The sheet is not a worksheet.

InvalidDocumentException

The sheet's part is malformed.