G
Guest
I am using Excel automation for a report.
Dim objExcel As New Excel.Application
objExcel.DisplayAlerts = False
Dim objWorkbooks As Excel.Workbooks = objExcel.Workbooks
Dim objWorkbook As Excel.Workbook
Dim objXLsheetUnits As Excel.Worksheet
objWorkbook = objWorkbooks.Open(strPath)
Then worksheets are populated with data from database and a macro is run as
objExcel.Run("Update_Workbook")
Process is killed forcefully on exit.
I want to add an Abort Option for the Run Report functionality.
If user clicks Run report and then Abort the report generation should stop
and
the process should be killed. But I can see the btnAbort.Click() is not
invoked
untill the report generation is completed.
Has anyone worked in Excel Automation implemented Abort Functionality?
Dim objExcel As New Excel.Application
objExcel.DisplayAlerts = False
Dim objWorkbooks As Excel.Workbooks = objExcel.Workbooks
Dim objWorkbook As Excel.Workbook
Dim objXLsheetUnits As Excel.Worksheet
objWorkbook = objWorkbooks.Open(strPath)
Then worksheets are populated with data from database and a macro is run as
objExcel.Run("Update_Workbook")
Process is killed forcefully on exit.
I want to add an Abort Option for the Run Report functionality.
If user clicks Run report and then Abort the report generation should stop
and
the process should be killed. But I can see the btnAbort.Click() is not
invoked
untill the report generation is completed.
Has anyone worked in Excel Automation implemented Abort Functionality?