How to Group and Ungroup Rows and Columns in Excel ByRegan Pun March 31, 2024 Updated June 22, 2025 Share: Unlock the full potential of Excel data management by watching our step-by-step tutorial on grouping and ungrouping rows and columns with IronXL, and see how just a few lines of C# code can streamline your workflow and enhance data navigation! more... In this tutorial, we explore the process of grouping and ungrouping rows and columns in Excel using the IronXL library. The video provides a step-by-step guide, starting with the installation of IronXL via the NuGet package manager. The tutorial then progresses to importing the IronXL namespace to access essential Excel functionalities. An existing Excel spreadsheet is loaded into a workbook object, and the default worksheet is obtained. The code demonstrates how to group rows 1 to 8 and columns A to F using the GroupRows and GroupColumns methods, respectively. Parameters specify the starting and ending indexes. Optional steps to ungroup rows or columns are also discussed. After saving the changes to a new Excel file named grouped.xlsx, the tutorial shows how the grouped rows and columns appear with expandable and collapsible buttons for easy data navigation. With just a few lines of C# code, users can significantly improve their Excel data management. The tutorial concludes by encouraging viewers to subscribe for more insights and offers a free trial license for further exploration of Iron software.Further Reading: How to Group and Ungroup Rows & Columns show less