'Declaration Public Event EndExport As EndExportEventHandler
public event EndExportEventHandler EndExport
The event handler receives an argument of type EndExportEventArgs containing data related to this event. The following EndExportEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Canceled | True if exporting process was been canceled. |
CurrentColumnIndex (Inherited from Infragistics.Win.UltraWinGrid.ExcelExport.ExcelExportEventArgs) | Zero-based index of current exporting column in excel worksheet. |
CurrentOutlineLevel (Inherited from Infragistics.Win.UltraWinGrid.ExcelExport.ExcelExportEventArgs) | Current outline level used for grouping. |
CurrentRowIndex (Inherited from Infragistics.Win.UltraWinGrid.ExcelExport.ExcelExportEventArgs) | Zero-based index of current exporting row in excel worksheet. |
CurrentWorksheet (Inherited from Infragistics.Win.UltraWinGrid.ExcelExport.ExcelExportEventArgs) | Current exporting worksheet. |
Workbook (Inherited from Infragistics.Win.UltraWinGrid.ExcelExport.ExcelExportEventArgs) | Exporting workbook. |
The Canceled argument is true if exporting process was been canceled.
This event has Workbook, CurrentWorksheet, CurrentRowIndex, CurrentColumnIndex, CurrentOutlineLevel arguments inherited from ExcelExportEventArgs.
This event is fired after exporting process is finished and is fired after all other events. Use this event for any post processing of excel workbook.
Private Sub MyGridExporter_BeginExport(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.ExcelExport.BeginExportEventArgs) Handles MyGridExporter.BeginExport Dim ws As Worksheet ws = e.CurrentWorksheet.Workbook.Worksheets.Add("InfoSheet") ws.Columns(1).Width = 20 * 256 ws.Columns(2).Width = 20 * 256 ws.Rows(1).Cells(1).Value = "Export started at:" ws.Rows(1).Cells(2).Value = DateTime.Now e.CurrentWorksheet.Workbook.ActiveWorksheet = ws End Sub Private Sub MyGridExporter_EndExport(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.ExcelExport.EndExportEventArgs) Handles MyGridExporter.EndExport Dim ws As Worksheet ws = e.CurrentWorksheet.Workbook.Worksheets("InfoSheet") ws.Rows(2).Cells(1).Value = "Export successful!" End Sub
public void BeginExportEH(object sender, BeginExportEventArgs e) { Worksheet ws = e.CurrentWorksheet.Workbook.Worksheets.Add("InfoSheet"); ws.Columns[1].Width = 20*256; ws.Columns[2].Width = 20*256; ws.Rows[1].Cells[1].Value = "Export started at:"; ws.Rows[1].Cells[2].Value = DateTime.Now; e.CurrentWorksheet.Workbook.ActiveWorksheet = ws; } public void EndExportEH(object sender, EndExportEventArgs e) { Worksheet ws = e.CurrentWorksheet.Workbook.Worksheets["InfoSheet"]; ws.Rows[2].Cells[1].Value = "Export successful!"; }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2