XlsxExportOptionsEx.CustomizeSheetSettings Event

Allows you to customize the output document’s settings. Only available in data-aware export mode.

Namespace: DevExpress.XtraPrinting

Assembly: DevExpress.Printing.v21.1.Core.dll


public event CustomizeSheetSettingsEventHandler CustomizeSheetSettings


To learn more about the functionality provided by this event, see XlsExportOptionsEx.CustomizeSheetSettings.


The CustomizeSheetSettings event is not currently supported when exporting data from Advanced Banded Grid Views.


This example uses the XlsxExportOptionsEx.CustomizeSheetSettings event to specify export settings for an XLSX document (a result of data exporting from a Grid Control). The ExportContext.SetFixedHeader event method is used to anchor the output document’s header to the top, and to set the fixed header height. The ExportContext.SetFixedHeader method is called to add the AutoFilter button to the document’s cells corresponding to the grid column headers.


void options_CustomizeSheetSettings(CustomizeSheetEventArgs e) {
    // Anchor the output document's header to the top and set its fixed height. 
    const int lastHeaderRowIndex = 15;
    // Add the AutoFilter button to the document's cells corresponding to the grid column headers.
    e.ExportContext.AddAutoFilter(new XlCellRange(new XlCellPosition(0, lastHeaderRowIndex), new XlCellPosition(5, 100)));
See Also