Class ExcelExportingOptions
Class which is used to set the exporting options. User can pass the instance of this class as an argument to the ExportToExcel method.
Inheritance
Namespace: Syncfusion.UI.Xaml.Grid.Converter
Assembly: Syncfusion.SfGridConverter.WPF.dll
Syntax
public class ExcelExportingOptions : Object
Constructors
ExcelExportingOptions()
Initializes a new instance of the ExcelExportingOptions class.
Declaration
public ExcelExportingOptions()
ExcelExportingOptions(ExcelVersion, Boolean, Boolean, GridExcelExportingEventhandler, GridCellExcelExportingEventHandler)
Declaration
public ExcelExportingOptions(ExcelVersion ExcelVersion, bool ExportAllPages, bool AllowOutlining, GridExcelExportingEventhandler ExportingEventHandler, GridCellExcelExportingEventHandler CellsExportingEventHandler)
Parameters
Type | Name | Description |
---|---|---|
ExcelVersion | ExcelVersion | |
System.Boolean | ExportAllPages | |
System.Boolean | AllowOutlining | |
GridExcelExportingEventhandler | ExportingEventHandler | |
GridCellExcelExportingEventHandler | CellsExportingEventHandler |
Fields
ExcludeColumns
list of columns that should be excluded while exporting
Declaration
public List<string> ExcludeColumns
Field Value
Type |
---|
System.Collections.Generic.List<System.String> |
Properties
AllowOutlining
Gets or sets the value that indicates whether the groups should export with expand/collapse options or not. There is no indent space maintained if AllowOutlining is set to true. If the grid contains the Details View definition, the AllowOutlining is set to true internally.
Declaration
public bool AllowOutlining { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if Outlining is enabled; otherwise, false.The default value is true. |
CellsExportingEventHandler
Gets or sets the value which is used to handle or customize the exporting of a particular cell in Excel.
Declaration
public GridCellExcelExportingEventHandler CellsExportingEventHandler { get; set; }
Property Value
Type |
---|
GridCellExcelExportingEventHandler |
ChildExportingEventHandler
Gets or sets the value which is used to customize the exporting of Details View.
Declaration
public GridChildExportingEventHandler ChildExportingEventHandler { get; set; }
Property Value
Type |
---|
GridChildExportingEventHandler |
Columns
Gets list of columns which includes excluding of ExcludeColumns.
Declaration
public List<string> Columns { get; }
Property Value
Type |
---|
System.Collections.Generic.List<System.String> |
ExcelVersion
Gets or sets the Excel version for the exported workbook.
Declaration
public ExcelVersion ExcelVersion { get; set; }
Property Value
Type | Description |
---|---|
ExcelVersion | One of the ExcelVersion enumeration values that specifies the Excel version. The default value is Excel2007. |
ExportAllPages
Gets or sets the value which specifies whether all pages should be exported for PagedCollection.By default, only current page will be exported
Declaration
public bool ExportAllPages { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if all pages should be exported; otherwise, false.The default value is false. |
Remarks
This option is not supported with OnDemandPaging.
ExportingEventHandler
Gets or sets the value which is used to customize the styles for Header, Table Summary, Group Summary and Caption Summary rows.
Declaration
public GridExcelExportingEventhandler ExportingEventHandler { get; set; }
Property Value
Type |
---|
GridExcelExportingEventhandler |
ExportMergedCells
Gets or Sets the value which indicates whether the Merged Cells should be exported or not
Declaration
public bool ExportMergedCells { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if MergedCells should be exported; otherwise, false.The default value is false. |
ExportMode
Gets or sets the value which specifies how the data should be exported to Excel
Declaration
public ExportMode ExportMode { get; set; }
Property Value
Type | Description |
---|---|
ExportMode | One of the ExportMode enumeration that specifies the ExportMode. The default mode is Value. |
ExportPageOptions
Gets or sets the value which specifies how paged collection should be exported to excel
Declaration
public ExportPageOptions ExportPageOptions { get; set; }
Property Value
Type | Description |
---|---|
ExportPageOptions | One of the ExportPageOptions enumeration that specifies the ExportPageOptions. The default mode is ExportToSingleSheet. |
ExportStackedHeaders
Gets or sets the value which indicates whether stacked headers should be exported or not
Declaration
public bool ExportStackedHeaders { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if StackedHeaders should be exported; otherwise, false.The default value is false. |
ExportUnBoundRows
Gets or sets the value which indicates whether the UnBoundRows should be exported or not
Declaration
public bool ExportUnBoundRows { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if UnBoundRows should be exported; otherwise, false.The default value is false. |
RowIndex
Gets or sets the row index of SfDataGrid which keeps track of the row index while exporting.
Declaration
public int RowIndex { get; set; }
Property Value
Type |
---|
System.Int32 |
StartColumnIndex
Gets or sets the starting column index for the exported data in the Excel sheet.
Declaration
public int StartColumnIndex { get; set; }
Property Value
Type |
---|
System.Int32 |
StartRowIndex
Gets or sets the starting row index for the exported data in the Excel sheet.
Declaration
public int StartRowIndex { get; set; }
Property Value
Type |
---|
System.Int32 |