Skip to main content
A newer version of this page is available. .

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.v19.2.Core.dll

Declaration

public event CustomizeSheetSettingsEventHandler CustomizeSheetSettings

Remarks

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

Note

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

Example

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.

GridExportOutputResult

void options_CustomizeSheetSettings(CustomizeSheetEventArgs e) {
    // Anchor the output document's header to the top and set its fixed height. 
    const int lastHeaderRowIndex = 15;
    e.ExportContext.SetFixedHeader(lastHeaderRowIndex);
    // 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)));
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CustomizeSheetSettings event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also