Articles in this section
Category / Section

How do I group Rows and Columns

1 min read

The IRange class has the Group and Ungroup methods that can be used for grouping and ungrouping rows and columns in a worksheet.

C#

//Grouping Rows and Columns
mySheet.Range["A1:A5"].Group(ExcelGroupBy.ByRows);
mySheet.Range["A1:E1"].Group(ExcelGroupBy.ByColumns);

VB

'Grouping Rows and Columns
mySheet.Range("A1:A5").Group(ExcelGroupBy.ByRows)
mySheet.Range("A1:E1").Group(ExcelGroupBy.ByColumns)

Here is the sample for your reference:

https://www.syncfusion.com/downloads/support/directtrac/89898/GroupingandUnGrouping1992232692.zip

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied