
'Declaration
<DefaultMemberAttribute("Item")> Public Class MergedCellCollection Inherits WorksheetElement
'Usage
Dim instance As MergedCellCollection
[DefaultMember("Item")] public class MergedCellCollection : WorksheetElement
using( var workbook = Workbook.Create( "MergedCellCollection.xlsx" ) ) { // Gets the first Worksheet; a Workbook always contains at least 1 Worksheet. var worksheet = workbook.Worksheets[ 0 ]; // Merges Cells A1 to B2. var mergedCells = worksheet.MergedCells.Add( "A1", "B2" ); var cellCount = mergedCells.Count; // Merges the Cells in the D4 to D8 range. var cellRange = worksheet.Cells[ "D4", "D8" ]; cellRange.MergeCells(); // Saves Workbook to disk; workbook.Save(); }
System.Object
Xceed.Workbooks.NET.WorkbookElement
Xceed.Workbooks.NET.WorksheetElement
Xceed.Workbooks.NET.MergedCellCollection
Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2