PrintingSystemBase.XlSheetCreated Event
Occurs after creation of an XLS or XLSX document worksheet has finished.
Namespace: DevExpress.XtraPrinting
Assembly: DevExpress.Printing.v24.2.Core.dll
Declaration
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).
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references 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.