Table of Contents

Method GroupColumns

Namespace
DocWright.Spreadsheet
Assembly
DocWright.Spreadsheet.dll

GroupColumns(int, int, bool)

Groups columns, as Excel's Data > Group does. See GroupRows(int, int, bool).

public void GroupColumns(int first, int last, bool collapsed = false)

Parameters

first int

The first one-based column of the group.

last int

The last one-based column of the group.

collapsed bool

Whether the group is shown collapsed: its columns hidden and its summary column marked.

Exceptions

ArgumentOutOfRangeException

The columns are outside the worksheet grid, or last is before first.

InvalidOperationException

The sheet is not a worksheet, or a column is already seven levels deep.

InvalidDocumentException

The sheet's part is malformed.