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 takes index position of rows to apply grouping. Multiple grouping is possible by using the same method again.

Use UngroupRows method to do the ungrouping of rows. This method act like a cutting tool. Apply it to the middle of the row group to cut it into two. However, these two groups of rows will not become different group. For example, apply ungroup 2-4 to group of 0-9 will give the result of a group of 0-1 & 5-9.

Group & Ungroup Columns

Columns can be group in similar manner as rows. Use GroupColumns method to group column with either specifying index position of columns or columns name in string. It is also possible to have multiple groups of columns.

Similar to ungrouping of rows, the UngroupColumn method acts as a cutting tool. Applying it to the middle of a column group will split it into two. For example, applying ungroup C-D to a column group of A-F will result in one group of A-B and E-F.

Please note that all the index position mentioned above follows zero-based indexing. Also,the grouping can only be applied only as far as the cell contains value.