Syncfusion.XlsIO.Base
Example 


Represents to expand the group by rows/columns.

Ungroup Method (IRange)

Ungroups the Range.
Syntax
'Declaration
 
Function Ungroup( _
   ByVal groupBy As ExcelGroupBy _
) As IRange
'Usage
 
Dim instance As IRange
Dim groupBy As ExcelGroupBy
Dim value As IRange
 
value = instance.Ungroup(groupBy)

Parameters

groupBy
Represents to expand the group by rows/columns.

Return Value

Returns the Range after ungrouping.
Example
The following code illustrates how to ungroup the Range.
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Excel2013;
IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
IWorksheet worksheet = workbook.Worksheets[0];
    
//Ungroup Rows
worksheet.Range["A1:A3"].UnGroup(ExcelGroupBy.ByRows);
            
//Ungroup Columns
worksheet.Range["C1:F1"].UnGroup(ExcelGroupBy.ByColumns);
            
workbook.SaveAs("Ungrouping.xlsx");
workbook.Close();
excelEngine.Dispose();
AssemblyVersion

Syncfusion.XlsIO.Base: 17.2460.0.34

See Also