Create range group
You can apply row/column grouping by using the Group method of the IRange interface and specifying the rows/columns you want to apply grouping on. Refer to the following example code to apply row/column grouping in a worksheet.