WinForms

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DataGridExcelExportExtension - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class DataGridExcelExportExtension

    Provides the extensions for exporting SfDataGrid into excel.

    Inheritance
    System.Object
    DataGridExcelExportExtension
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    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 which is used to set the exporting options.

    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 which is used to set the exporting options.

    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 which is used to set the exporting options.

    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 which is used to set the exporting options.

    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
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved