Syncfusion.XlsIO.Base
Example 


Syncfusion.XlsIO Namespace > IRange Interface > ExpandGroup Method : ExpandGroup(ExcelGroupBy,ExpandCollapseFlags) Method
Represents to expand the group by rows/columns.
Represent the collapses options.

ExpandGroup(ExcelGroupBy,ExpandCollapseFlags) Method

Expands the group by row/column with collapse option.
Syntax
'Declaration
 
Overloads Sub ExpandGroup( _
   ByVal groupBy As ExcelGroupBy, _
   ByVal flags As ExpandCollapseFlags _
) 
'Usage
 
Dim instance As IRange
Dim groupBy As ExcelGroupBy
Dim flags As ExpandCollapseFlags
 
instance.ExpandGroup(groupBy, flags)

Parameters

groupBy
Represents to expand the group by rows/columns.
flags
Represent the collapses options.
Example
The following code illustrates how to perform ExpandGroup in the Range with collapse option.
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Excel2013;
             
IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
IWorksheet worksheet = workbook.Worksheets[0];
    
//Expand group with flag set to expand parent
worksheet.Range["A5:A15"].ExpandGroup(ExcelGroupBy.ByRows, ExpandCollapseFlags.ExpandParent);
             
workbook.SaveAs("ExpandGroup.xlsx");
workbook.Close();
excelEngine.Dispose();
AssemblyVersion

Syncfusion.XlsIO.Base: 17.1460.0.32

See Also