Class GridExcelExportExtension
Provides the extensions for exporting SfDataGrid into Excel.
Inheritance
Namespace: Syncfusion.UI.Xaml.Grid.Converter
Assembly: Syncfusion.SfGridConverter.UWP.dll
Syntax
public static class GridExcelExportExtension : Object
Methods
ExportCollectionToExcel(SfDataGrid, ICollectionViewAdv)
Exports the dataGrid to excel.
Declaration
public static ExcelEngine ExportCollectionToExcel(this SfDataGrid grid, ICollectionViewAdv gridCollectionView)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | grid | specifies the SfDataGrid. |
ICollectionViewAdv | gridCollectionView | Specifies the SfDataGrid view. |
Returns
Type | Description |
---|---|
ExcelEngine | Returns the instance of class ExcelEngine. |
ExportCollectionToExcel(SfDataGrid, ICollectionViewAdv, ExcelVersion)
Exports the dataGrid to excel.
Declaration
public static ExcelEngine ExportCollectionToExcel(this SfDataGrid grid, ICollectionViewAdv gridCollectionView, ExcelVersion excelVersion)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | grid | Specifies the SfDataGrid. |
ICollectionViewAdv | gridCollectionView | Specifies the SfDataGrid view. |
ExcelVersion | excelVersion | Specifies the excel Version. |
Returns
Type | Description |
---|---|
ExcelEngine | Returns the instance of class ExcelEngine. |
ExportCollectionToExcel(SfDataGrid, ICollectionViewAdv, ExcelVersion, GridExcelExportingEventhandler, GridCellExcelExportingEventHandler, Boolean)
Exports the dataGrid to excel by considering Grouping,Sorting,Filtering,Summaries,Paging,NestedGrid,CellTypes,Unbound rows, Merged cells and Stacked headers.
Declaration
public static ExcelEngine ExportCollectionToExcel(this SfDataGrid grid, ICollectionViewAdv gridCollectionView, ExcelVersion excelVersion, GridExcelExportingEventhandler exportingHandler, GridCellExcelExportingEventHandler cellsExportingHandler, bool exportAllPages)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | grid | Specifies the SfDataGrid. |
ICollectionViewAdv | gridCollectionView | Specifies the SfDataGrid view. |
ExcelVersion | excelVersion | Specifies the excel Version. |
GridExcelExportingEventhandler | exportingHandler | Specifies the delegate handler which is used to customize the styles for Header, Table Summary, Group Summary and Caption Summary rows. |
GridCellExcelExportingEventHandler | cellsExportingHandler | Specifies the delegate handler which is used to customize the exporting of Details View. |
System.Boolean | exportAllPages | Specify whether need to export all the pages or not. |
Returns
Type | Description |
---|---|
ExcelEngine | Returns the instance of class ExcelEngine. |
ExportToExcel(SfDataGrid, ICollectionViewAdv, ExcelExportingOptions)
Exports the dataGrid to excel by considering Grouping,Sorting,Filtering,Summaries,Paging,NestedGrid,CellTypes,Unbound rows, Merged cells and Stacked headers.
Declaration
public static ExcelEngine ExportToExcel(this SfDataGrid grid, ICollectionViewAdv gridCollectionView, ExcelExportingOptions excelExportingOptions)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | grid | Specifies the SfDataGrid. |
ICollectionViewAdv | gridCollectionView | Specifies SfDataGrid view. |
ExcelExportingOptions | excelExportingOptions | Specifies the instance of class ExcelExportingOptions |
Returns
Type | Description |
---|---|
ExcelEngine | Returns the ExcelEngine. |
ExportToExcel(SfDataGrid, ICollectionViewAdv, ExcelExportingOptions, IWorksheet)
Exports the dataGrid to excel.
Declaration
public static void ExportToExcel(this SfDataGrid grid, ICollectionViewAdv gridCollectionView, ExcelExportingOptions excelExportingOptions, IWorksheet worksheet)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | grid | Specifies the SfDataGrid. |
ICollectionViewAdv | gridCollectionView | Specifies the SfDataGrid view |
ExcelExportingOptions | excelExportingOptions | Specifies the instance of class ExcelExportingOptions |
IWorksheet | worksheet | Specifies the exported worksheet. |
ExportToExcel(SfDataGrid, ObservableCollection<Object>, ExcelExportingOptions)
Export Selected items to Excel.
Declaration
public static ExcelEngine ExportToExcel(this SfDataGrid grid, ObservableCollection<object> selectedItems, ExcelExportingOptions excelExportingOptions)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | grid | Specifies the SfDataGrid. |
System.Collections.ObjectModel.ObservableCollection<System.Object> | selectedItems | Specifies the Selected Items. |
ExcelExportingOptions | excelExportingOptions | Specifies the instance of class ExcelExportingOptions |
Returns
Type | Description |
---|---|
ExcelEngine | Returns the instance of class ExcelEngine. |
ExportToExcel(SfDataGrid, ObservableCollection<Object>, ExcelExportingOptions, IWorksheet)
Export Selected items to Excel.
Declaration
public static void ExportToExcel(this SfDataGrid grid, ObservableCollection<object> selectedItems, ExcelExportingOptions excelExportingOptions, IWorksheet sheet)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | grid | Specifies the SfDataGrid. |
System.Collections.ObjectModel.ObservableCollection<System.Object> | selectedItems | Specifies the Selected Items. |
ExcelExportingOptions | excelExportingOptions | Specifies the instance of class ExcelExportingOptions |
IWorksheet | sheet | Specifies the Worksheet. |