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
firstintThe first one-based column of the group.
lastintThe last one-based column of the group.
collapsedboolWhether the group is shown collapsed: its columns hidden and its summary column marked.
Exceptions
- ArgumentOutOfRangeException
The columns are outside the worksheet grid, or
lastis beforefirst.- InvalidOperationException
The sheet is not a worksheet, or a column is already seven levels deep.
- InvalidDocumentException
The sheet's part is malformed.