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
Assembly: Syncfusion.Maui.DataGridExport.dll
Syntax
public class DataGridExcelExportingController : Object
Constructors
DataGridExcelExportingController()
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
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
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
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
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
ExportTableSummariesToExcel(SfDataGrid, ICollectionViewAdv, IWorksheet, DataGridExcelExportingOption)
Export the table summaries to excel.
Declaration
protected void ExportTableSummariesToExcel(SfDataGrid dataGrid, ICollectionViewAdv view, IWorksheet sheet, DataGridExcelExportingOption exportOption)
Parameters
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
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
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
Returns
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
Returns
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
Returns
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
Returns
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
Returns
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
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
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
Events
CellExporting
Occurs when the cell is being exported to excel.
Declaration
public event EventHandler<DataGridCellExcelExportingEventArgs> CellExporting
Event Type
RowExporting
Occurs when the row is being exported to excel.
Declaration
public event EventHandler<DataGridRowExcelExportingEventArgs> RowExporting
Event Type