VIDEOS

How to Group and Ungroup Rows and Columns in Excel

Regan Pun
Regan Pun
March 31, 2024
Share:


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.

Get stated with IronXL now.
green arrow pointer

Regan Pun
Software Engineer
Regan graduated from the University of Reading, with a BA in Electronic Engineering. Before joining Iron Software, his previous job roles had him laser-focused on single tasks; and what he most enjoys at Iron Software is the spectrum of work he gets to undertake, whether it’s adding value to sales, technical support, product development or marketing. He enjoys understanding the way developers are using the Iron Software library, and using that knowledge to continually improve documentation and develop the products.
< PREVIOUS
How to Create Hyperlinks in Excel Using C#
NEXT >
How to Edit Workbook Metadata in C#