Group & Ungroup Rows & Columns
Apply group and ungroup of rows & columns with intuitive APIs without using Office Interop with IronXL library.
Group & Ungroup Rows
The GroupRows
method groups rows by taking index positions. You can apply multiple groupings using this method.
To ungroup rows, use the UngroupRows
method. This method acts like a cutting tool. When applied to the middle of a row group, it splits the group into two. However, the new groups remain connected as a single logical group. For example, ungrouping rows 2-4 within a group spanning 0-9 will result in groups 0-1 and 5-9.
Group & Ungroup Columns
Columns can be grouped similarly to rows. Use the GroupColumns
method to group columns by index or by specifying column names as strings. Create multiple column groups if needed.
Ungroup columns with the UngroupColumns
method, which also acts as a cutting tool. Applying it at the center of a column group splits it into two. For instance, ungrouping columns C-D within a group A-F results in groups A-B and E-F.
Please note that all index positions mentioned above follow zero-based indexing. Grouping can only be applied as far as the cells contain values.
Discover How to Easily Group & Ungroup Excel Rows & Columns with IronXL