Skip to main content

PrintingSystemBase.XlSheetCreated Event

Occurs after creation of an XLS or XLSX document worksheet has finished.

Namespace: DevExpress.XtraPrinting

Assembly: DevExpress.Printing.v23.2.Core.dll

NuGet Package: DevExpress.Printing.Core

Declaration

public event XlSheetCreatedEventHandler XlSheetCreated

Event Data

The XlSheetCreated event's data class is XlSheetCreatedEventArgs. The following properties provide information specific to this event:

Property Description
Index Specifies the Excel sheet index number.
SheetName Specifies the Excel sheet name.

Remarks

When you export to different worksheets (XlsxExportMode.SingleFilePageByPage mode), handle this event to name a worksheet in the exported file based on the page number. For this, set the XlSheetCreatedEventArgs.SheetName to a string composed of the XlSheetCreatedEventArgs.Index value.

The XlSheetCreated event is not raised when a document is exported to a single file (the XlsExportOptions.ExportMode or XlsxExportOptions.ExportMode option is set to SingleFile).

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the XlSheetCreated 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