Been trying to figure out how to be able to pass in an existing workbook output to my Invoke VB.Net Code. I know how to pass it via arguments and such, but in my code I use:
opposed to the UiPath library:
I basically want to be able to sick my invoke vb.net code into the excel application scope without having to read the file again and write some data into specific cells. But right now my code needs to handle the opening of the workbook. So there will always be a conflict-ion with the excel file being open in the excel scope as well as in my VBnet code and will throw an error. Anyone have any ideas on how to pass the workbook output to VBnet code to accomplish write jobs? My code is like this:
Dim worksheet As Microsoft.Office.Interop.Excel.Worksheet
Dim workbook As Microsoft.Office.Interop.Excel.Workbook
workbook = In_Workbook.CurrentWorkbook()
worksheet =DirectCast(workbook.Worksheets(“Sheet1”), Microsoft.Office.Interop.Excel.Worksheet)
Where In_Workbook is the UiPath WorkbookApplication passed as an argument in the Invoke code activity.