menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DataGridExcelExportingController - MAUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class DataGridExcelExportingController

    Represents a class which defines various options to export the SfDataGrid to an excel worksheets. Provides classes, methods, properties, and events to export and customize the exported values of a SfDataGrid.

    Inheritance
    System.Object
    DataGridExcelExportingController
    Namespace: Syncfusion.Maui.DataGrid.Exporting
    Assembly: Syncfusion.Maui.DataGridExport.dll
    Syntax
    public class DataGridExcelExportingController : Object

    Constructors

    DataGridExcelExportingController()

    Initializes a new instance of the DataGridExcelExportingController class.

    Declaration
    public DataGridExcelExportingController()

    Methods

    ExportCaptionSummaryCellToExcel(SfDataGrid, IRange, ExportCellType, String, String, DataGridExcelExportingOption)

    Export caption summary cell to excel.

    Declaration
    protected void ExportCaptionSummaryCellToExcel(SfDataGrid dataGrid, IRange summaryRange, ExportCellType exportCellType, string summaryDisplayText, string columnName, DataGridExcelExportingOption exportOption)
    Parameters
    Type Name Description
    SfDataGrid dataGrid
    IRange summaryRange
    ExportCellType exportCellType
    System.String summaryDisplayText
    System.String columnName
    DataGridExcelExportingOption exportOption

    ExportCellFormat(IRange, Object, DataGridColumn)

    Applies the cell format for the cell area based on grid column format such as currency, percentage, date time etc..

    Declaration
    protected void ExportCellFormat(IRange cellArea, object cellValue, DataGridColumn gridColumn)
    Parameters
    Type Name Description
    IRange cellArea
    System.Object cellValue
    DataGridColumn gridColumn

    ExportCellValue(SfDataGrid, RecordEntry, DataGridColumn, IRange, DataGridExcelExportingOption, Object)

    Exports cell value to the excel, cell value are obtained from the record using gridcolumn mappping name. when exporting each cell exporting event handler is called. For image column, image is converted as stream and then image will exports. For switch column, check box will export. When overridden in a derived class, is invoked whenever application code or internal processes call ExportCellValue

    Declaration
    protected void ExportCellValue(SfDataGrid dataGrid, RecordEntry record, DataGridColumn column, IRange cellArea, DataGridExcelExportingOption exportOption, object pagedRecord = null)
    Parameters
    Type Name Description
    SfDataGrid dataGrid
    RecordEntry record
    DataGridColumn column
    IRange cellArea
    DataGridExcelExportingOption exportOption
    System.Object pagedRecord

    ExportGroupSummaryCellToExcel(SfDataGrid, IRange, ExportCellType, String, String, DataGridExcelExportingOption)

    Export the group summary cell text to Excel.

    Declaration
    protected void ExportGroupSummaryCellToExcel(SfDataGrid dataGrid, IRange summaryRange, ExportCellType exportCellType, string summaryDisplayText, string columnName, DataGridExcelExportingOption exportOption)
    Parameters
    Type Name Description
    SfDataGrid dataGrid
    IRange summaryRange
    ExportCellType exportCellType
    System.String summaryDisplayText
    System.String columnName
    DataGridExcelExportingOption exportOption

    ExportRecordToExcel(SfDataGrid, RecordEntry, IRange, DataGridExcelExportingOption, Object)

    Exports a record to the excel worksheet. GridRowExcelExporting Event handler for record is handled here. When overridden in a derived class, is invoked whenever application code or internal processes call ExportRecordToExcel

    Declaration
    protected void ExportRecordToExcel(SfDataGrid dataGrid, RecordEntry record, IRange rowRange, DataGridExcelExportingOption exportOption, object pagedRecord = null)
    Parameters
    Type Name Description
    SfDataGrid dataGrid
    RecordEntry record
    IRange rowRange
    DataGridExcelExportingOption exportOption
    System.Object pagedRecord

    ExportTableSummariesToExcel(SfDataGrid, ICollectionViewAdv, IWorksheet, DataGridExcelExportingOption)

    Export the table summaries to excel.

    Declaration
    protected void ExportTableSummariesToExcel(SfDataGrid dataGrid, ICollectionViewAdv view, IWorksheet sheet, DataGridExcelExportingOption exportOption)
    Parameters
    Type Name Description
    SfDataGrid dataGrid
    ICollectionViewAdv view
    IWorksheet sheet
    DataGridExcelExportingOption exportOption

    ExportTableSummaryCellToExcel(SfDataGrid, IRange, ExportCellType, String, String, DataGridExcelExportingOption)

    Export the table summary display text to excel.

    Declaration
    protected void ExportTableSummaryCellToExcel(SfDataGrid dataGrid, IRange summaryRange, ExportCellType exportCellType, string summaryDisplayText, string columnName, DataGridExcelExportingOption exportOption)
    Parameters
    Type Name Description
    SfDataGrid dataGrid
    IRange summaryRange
    ExportCellType exportCellType
    System.String summaryDisplayText
    System.String columnName
    DataGridExcelExportingOption exportOption

    ExportTableSummaryToExcel(SfDataGrid, ICollectionViewAdv, IWorksheet, IRange, DataGridExcelExportingOption, SummaryRecordEntry)

    Export the table summary row to excel

    Declaration
    protected void ExportTableSummaryToExcel(SfDataGrid dataGrid, ICollectionViewAdv view, IWorksheet sheet, IRange rowArea, DataGridExcelExportingOption exportOption, SummaryRecordEntry summaryRecordEntry)
    Parameters
    Type Name Description
    SfDataGrid dataGrid
    ICollectionViewAdv view
    IWorksheet sheet
    IRange rowArea
    DataGridExcelExportingOption exportOption
    SummaryRecordEntry summaryRecordEntry

    ExportToExcel(SfDataGrid)

    Exports the data in the grid to the excel work sheet based on default export option and returns the excel engine.

    Declaration
    public ExcelEngine ExportToExcel(SfDataGrid dataGrid)
    Parameters
    Type Name Description
    SfDataGrid dataGrid
    Returns
    Type
    ExcelEngine

    ExportToExcel(SfDataGrid, ICollectionViewAdv, DataGridExcelExportingOption)

    Exports the data in the grid to the excel work sheet based on given export option and returns the excel engine.

    Declaration
    public ExcelEngine ExportToExcel(SfDataGrid dataGrid, ICollectionViewAdv collectionView, DataGridExcelExportingOption exportingOption)
    Parameters
    Type Name Description
    SfDataGrid dataGrid
    ICollectionViewAdv collectionView
    DataGridExcelExportingOption exportingOption
    Returns
    Type
    ExcelEngine

    ExportToExcel(SfDataGrid, ICollectionViewAdv, DataGridExcelExportingOption, IWorksheet)

    Exports the data in the grid to the given excel work sheet based on given export option and returns the excel worksheet.

    Declaration
    public IWorksheet ExportToExcel(SfDataGrid dataGrid, ICollectionViewAdv collectionView, DataGridExcelExportingOption exportingOption, IWorksheet worksheet)
    Parameters
    Type Name Description
    SfDataGrid dataGrid
    ICollectionViewAdv collectionView
    DataGridExcelExportingOption exportingOption
    IWorksheet worksheet
    Returns
    Type
    IWorksheet

    ExportToExcel(SfDataGrid, DataGridExcelExportingOption)

    Exports the data in the grid to the excel work sheet based on the given export option and returns the excel engine.

    Declaration
    public ExcelEngine ExportToExcel(SfDataGrid dataGrid, DataGridExcelExportingOption exportOption)
    Parameters
    Type Name Description
    SfDataGrid dataGrid
    DataGridExcelExportingOption exportOption
    Returns
    Type
    ExcelEngine

    ExportToExcel(SfDataGrid, ObservableCollection<Object>, DataGridExcelExportingOption)

    Exports the selected rows in the grid to the excel work sheet based on either given export option or default export option and returns the excel engine.

    Declaration
    public ExcelEngine ExportToExcel(SfDataGrid dataGrid, ObservableCollection<object> selectedItems, DataGridExcelExportingOption exportOption = null)
    Parameters
    Type Name Description
    SfDataGrid dataGrid
    System.Collections.ObjectModel.ObservableCollection<System.Object> selectedItems
    DataGridExcelExportingOption exportOption
    Returns
    Type
    ExcelEngine

    ExportUnboundRowCellToExcel(SfDataGrid, IRange, DataGridExcelExportingOption, DataGridUnboundRow, DataGridColumn)

    Export Unbound row cell value to excel.

    Declaration
    protected virtual void ExportUnboundRowCellToExcel(SfDataGrid grid, IRange excelrange, DataGridExcelExportingOption excelExportingOptions, DataGridUnboundRow gridUnboundRow, DataGridColumn gridColumn)
    Parameters
    Type Name Description
    SfDataGrid grid
    IRange excelrange
    DataGridExcelExportingOption excelExportingOptions
    DataGridUnboundRow gridUnboundRow
    DataGridColumn gridColumn

    ExportUnboundRowsToExcel(SfDataGrid, ICollectionViewAdv, IWorksheet, DataGridExcelExportingOption, DataGridUnboundRowPosition, Boolean, ObservableCollection<DataGridUnboundRow>)

    Exports unbound rows to excel.

    Declaration
    protected void ExportUnboundRowsToExcel(SfDataGrid dataGrid, ICollectionViewAdv view, IWorksheet sheet, DataGridExcelExportingOption exportOption, DataGridUnboundRowPosition position, bool belowSummary, ObservableCollection<DataGridUnboundRow> unBoundRows = null)
    Parameters
    Type Name Description
    SfDataGrid dataGrid
    ICollectionViewAdv view
    IWorksheet sheet
    DataGridExcelExportingOption exportOption
    DataGridUnboundRowPosition position
    System.Boolean belowSummary
    System.Collections.ObjectModel.ObservableCollection<DataGridUnboundRow> unBoundRows

    ExportUnboundRowToExcel(SfDataGrid, IWorksheet, DataGridExcelExportingOption, DataGridUnboundRow, ExportCellType)

    Export unbound row to excel.

    Declaration
    protected void ExportUnboundRowToExcel(SfDataGrid dataGrid, IWorksheet sheet, DataGridExcelExportingOption exportOption, DataGridUnboundRow gridUnboundRow, ExportCellType celltype)
    Parameters
    Type Name Description
    SfDataGrid dataGrid
    IWorksheet sheet
    DataGridExcelExportingOption exportOption
    DataGridUnboundRow gridUnboundRow
    ExportCellType celltype

    Events

    CellExporting

    Occurs when the cell is being exported to excel.

    Declaration
    public event EventHandler<DataGridCellExcelExportingEventArgs> CellExporting
    Event Type
    Type
    System.EventHandler<DataGridCellExcelExportingEventArgs>

    RowExporting

    Occurs when the row is being exported to excel.

    Declaration
    public event EventHandler<DataGridRowExcelExportingEventArgs> RowExporting
    Event Type
    Type
    System.EventHandler<DataGridRowExcelExportingEventArgs>
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved