I have two datatables with a common column name. Based on this column name i want to merge 1 of the columns from the 1st datatable to another datatable.
Have you checked these posts related to your request?
hi @arivu96 this xaml is working fine but when i do the same thing in another file unfortunately it doesnt work. I dont understand what i am doing wrong. where have you used the result and dt3 variable?
@ovi can you help me where the result file is being used coz the invoke doesnt seem to work for other files. this is the error i get
**"Main has thrown an exception
Source: Invoke method
Message: Object reference not set to an instance of an object. This error usually occurs when using a variable with no set value (not initialized).
Exception Type: NullReferenceException
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Activities.Statements.MethodExecutor.InvokeAndUnwrapExceptions(Func`3 func, Object targetInstance, Object actualParameters)
at System.Activities.Statements.MethodResolver.SyncMethodExecutor.BeginMakeMethodCall(AsyncCodeActivityContext context, Object target, AsyncCallback callback, Object state)
at System.Activities.Statements.MethodExecutor.BeginExecuteMethod(AsyncCodeActivityContext context, AsyncCallback callback, Object state)
at System.Activities.Statements.InvokeMethod.BeginExecute(AsyncCodeActivityContext context, AsyncCallback callback, Object state)
at System.Activities.AsyncCodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)"**
In Invoke method activity have you set the right Parameters?
Could you upload your workflow please?
Your second Read Range activity has also the output datatable “dt1”. So when you set “dt2” as In parameter in Invoke method, it throws that error because it is not initialized.
So change the output in the second Read Range(“Sheet2”) to “dt2”.
Hope it helps!
I cleared all that but I am still getting the error. can you please update the xaml and attach it?
The issue is with the column names. Change in excel the first Id name with ID and it should work fine.