Class DataGridExcelExportExtension
Provides the extensions for exporting SfDataGrid into Excel.
Inheritance
Inherited Members
Namespace: Syncfusion.WinForms.DataGridConverter
Assembly: Syncfusion.SfDataGridConverter.WinForms.dll
Syntax
public static class DataGridExcelExportExtension
Methods
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 |
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 |
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 |
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 |
IWorksheet | sheet | Specifies the Worksheet. |
ExportToExcel(SfDataGrid, String, ICollectionViewAdv, ExcelExportingOptions)
Declaration
public static void ExportToExcel(this SfDataGrid grid, string excelFileName, ICollectionViewAdv gridCollectionView, ExcelExportingOptions excelExportingOptions)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | grid | |
System.String | excelFileName | |
ICollectionViewAdv | gridCollectionView | |
ExcelExportingOptions | excelExportingOptions |
ExportToExcel(SfDataGrid, String, ObservableCollection<Object>, ExcelExportingOptions)
Declaration
public static void ExportToExcel(this SfDataGrid grid, string excelFileName, ObservableCollection<object> selectedItems, ExcelExportingOptions excelExportingOptions)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | grid | |
System.String | excelFileName | |
System.Collections.ObjectModel.ObservableCollection<System.Object> | selectedItems | |
ExcelExportingOptions | excelExportingOptions |