Syncfusion.XlsIO.Base
Example 


DataSorter Property (IWorksheet)

Gets the DataSorter.
Syntax
'Declaration
 
ReadOnly Property DataSorter As IDataSort
'Usage
 
Dim instance As IWorksheet
Dim value As IDataSort
 
value = instance.DataSorter
IDataSort DataSorter {get;}

Property Value

The sparkline groups.
Example
The following code illustrates how to get the DataSorter from the sheet.
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Excel2013;
IWorkbook workbook = application.Workbooks.Open("Sorting.xlsx");
             
Create DataSorter for worksheet.
IDataSort sheetSort = workbook.Worksheets[0].DataSorter;
            
//Adding Sort range for worksheet
sheetSort.SortRange = workbook.Worksheets[0].UsedRange;
             
Adding Sorting fields for DataSorter.
sheetSort.SortFields.Add(1, SortOn.Values, OrderBy.Ascending);
            
Perform Sorting for worksheet range.
sheetSort.Sort();
            
workbook.SaveAs("SortedExcel.xlsx");
workbook.Close();
excelEngine.Dispose();
AssemblyVersion

Syncfusion.XlsIO.Base: 16.4460.0.40

See Also