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. The ungrouping of columns with UngroupColumn method does not have the same behavior as of row. This method act like a trimming tool instead. It will ungroup from the specified starting position to the end of the column group. For example, apply ungroup D-F to group of A-G will give the result of a column group of A-C. 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.