How to Merge and Unmerge Cells in Excel Jordi Bardia Updated:August 19, 2025 Download IronXL NuGet Download DLL Download Start Free Trial Copy for LLMs Copy for LLMs Copy page as Markdown for LLMs Open in ChatGPT Ask ChatGPT about this page Open in Gemini Ask Gemini about this page Open in Grok Ask Grok about this page Open in Perplexity Ask Perplexity about this page Share Share on Facebook Share on X (Twitter) Share on LinkedIn Copy URL Email article Unlock the full potential of Excel with IronXL by learning how to efficiently merge and unmerge cells, enhance your data presentation, and streamline your workflow in our step-by-step tutorial! more... In this tutorial, we delve into merging and unmerging cells in Excel using the IronXL Library. First, ensure the IronXL Library is installed via the NuGet package manager. The tutorial begins by loading an existing Excel workbook, 'data.xlsx', from the C drive into a workbook object. The default worksheet is accessed and stored in a variable named 'worksheet'. A cell range from B2 to B5 is defined and stored in 'range'. The tutorial demonstrates merging cells in two ranges: B7 to E7 and B2 to B5. It retrieves a list of all merged regions in the worksheet using 'getMergedRegions' and prints their addresses. Additionally, an option to unmerge the B7 to E7 cell range is mentioned. The workbook is saved as 'merge cell.xlsx', reflecting the merged cells. The video concludes by showing the merged cells in the output file and encourages viewers to try out the software's free trial. Viewers are invited to like, subscribe, and comment with questions or feedback.
Published November 18, 2025 How to Clear Cell Contents in Excel with C# | IronXL Discover how to programmatically clear data from Excel cells in your .NET applications using IronXL. From individual cell values to entire rows, this tutorial guides you through the process step-by-step, enhancing your data manipulation skills. Read More
Published November 17, 2025 How to Import and Export as a DataSet in C# | IronXL Discover how to transform your .NET DataTable or DataSet into Excel files seamlessly with IronXL. This tutorial walks you through the process of exporting structured data to .xlsx files, enhancing your data management capabilities. Read More
Published November 8, 2025 How to Add Comments to Excel Cells in C# | IronXL Discover how to manage Excel cell comments seamlessly with C# and IronXL. This video tutorial guides you through the process of adding, editing, and removing comments in Excel spreadsheets without needing Interop. Perfect for developers looking to enhance their automation capabilities in Excel. Read More
Published October 20, 2025 How to Autofit Cells in Excel Using C# | IronXL Discover how to automatically adjust cell dimensions in Excel using C# and IronXL. This video tutorial guides you through the process of autofitting columns and rows, ensuring your spreadsheets appear polished and professional with minimal effort. Read More
Published September 30, 2025 How to Export DataGridView to Excel in C# | IronXL Discover how to seamlessly export DataGridView to Excel in your C# applications using IronXL. This tutorial guides you through the process, ensuring a smooth integration with WinForms or WPF. Enhance your app's functionality and data manipulation capabilities with this straightforward method. Read More
Published September 17, 2025 How to Read Data from a CSV File and Store It in a Database Using C# | IronXL Discover how to automate CSV imports into your SQL Server database using C# and IronXL. This tutorial provides a step-by-step guide to efficiently read and insert CSV data into SQL Server, streamlining your data management processes. Read More
All your questions are answered to make sure you have all the information you need. (No commitment whatsoever.)