Syncfusion.XlsIO.Base
Example 


MergeArea Property

Gets a IRange object that represents the merged Range to which the cell or Range belongs. Read-only.
Syntax
'Declaration
 
ReadOnly Property MergeArea As IRange
'Usage
 
Dim instance As IRange
Dim value As IRange
 
value = instance.MergeArea
IRange MergeArea {get;}
Remarks
If the specified cell isn�t in a merged Range, this property gets NULL.
Example
The following code illustrates how to access MergeArea property.
using Syncfusion.XlsIO;
using System;
            
class Program
{
    static void Main()
    {
        using (ExcelEngine excelEngine = new ExcelEngine())
        {
            //Create worksheet
            IApplication application = excelEngine.Excel;
            application.DefaultVersion = ExcelVersion.Excel2013;
            IWorkbook workbook = application.Workbooks.Create(1);
            IWorksheet worksheet = workbook.Worksheets[0];
            
            //Set text
            worksheet["C2"].Text = "Sample";
            worksheet["D2"].Text = "text";
            worksheet["C3"].Text = "in";
            worksheet["D3"].Text = "cell";
            
            //Merge
            worksheet["C2:D3"].Merge();
            
            //Check merge area
            Console.Write(worksheet["C2"].MergeArea.AddressLocal);
            
            //Save and dispose
            workbook.SaveAs("CellFormats.xlsx");
            workbook.Close();
            Console.ReadKey();
        }
    }
}
//Output will be
//C2:D3
AssemblyVersion

Syncfusion.XlsIO.Base: 16.4460.0.40

See Also