Dim xlwb As Microsoft.Office.Interop.Excel.Workbook
Dim xlws As Microsoft.Office.Interop.Excel.Worksheet
Dim xlwb2 As Microsoft.Office.Interop.Excel.Workbook
Dim xlws2 As Microsoft.Office.Interop.Excel.Worksheet
Try
xlApp = New Microsoft.Office.Interop.Excel.ApplicationClass
xlwb = xlApp.Workbooks.Open(" ")
xlwb2 = xlApp.Workbooks.Open(vlookup_mappingFilePath + vlookup_mappingFileName)
xlApp.Visible = True
xlws = CType(xlwb.Sheets(report_sheetName),Microsoft.Office.Interop.Excel.Worksheet)
xlws2 = CType(xlwb2.Sheets(vlookup_mappingFileSheetName),Microsoft.Office.Interop.Excel.Worksheet)
xlws.Activate
xlws2.Activate
Dim rowCount As Integer = xlws.UsedRange.Rows.Count
Dim colCount As Integer = xlws.UsedRange.Columns.Count
Catch e As Exception
Console.WriteLine(e.Message)
throw e
Finally
xlwb.Save
xlApp.Quit()
End Try
I intentionally failing my code so that i could get a business exception from invoke code but i am unable to do that
how to throw BusinessRuleException from invoke code unable to do that if i am using full path “Uipath.Core.BusinessRuleException” then also it is going to that super class of exception that is System.Exception but i want if any error occur in my code it should be buisnessRuleEception…please