menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridExcelExportExtension - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GridExcelExportExtension

    Provides the extensions for exporting SfDataGrid into Excel.

    Inheritance
    System.Object
    GridExcelExportExtension
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.UI.Xaml.Grid.Converter
    Assembly: Syncfusion.SfGridConverter.WPF.dll
    Syntax
    public static class GridExcelExportExtension

    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.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved