Hi Guys,
I was trying a Invoke code for excel read and write but on trying i am getting an error as
“RemoteException wrapping System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> RemoteException wrapping System.NullReferenceException: Object reference not set to an instance of an object.
at UiPathCodeRunner_eb2b3f30dcd24da781d6091be953b7c7.Run()”
below is the code for invoke code
"
Dim xl As Microsoft.Office.Interop.Excel.Application
Dim worksheet As Microsoft.Office.Interop.Excel.Worksheet
Dim workbook As Microsoft.Office.Interop.Excel.Workbook
Dim sheet As Microsoft.Office.Interop.Excel.Worksheet
workbook=xl.Workbooks.Open(“C:\Users\Sahanish\Desktop\Test1.xlsx”)
sheet=CType(workbook.Sheets(0),Microsoft.Office.Interop.Excel.Worksheet)
'sheet.Cells(1,1)=“This is done”
workbook.Save
workbook.Close
xl.Quit "
Any help will be highly appreciated…Thanks in advance…