RemoteException wrapping System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> RemoteException wrapping System.ArgumentException: Column ‘Price’ does not belong to table DataTable.
at System.Data.DataRow.GetDataColumn(String columnName)
at System.Data.DataRow.set_Item(String columnName, Object value)
— End of inner exception stack trace —
at UiPath.Core.Activities.ScopeActivity.OnFaulted(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
The column “Price” exist with no data as data will be written to this column and confirmed the “AddHeaders” is checked
Hey. Change it to row.item(“Price”) and it will work if you’re in a For Each Row and there is a column named Price. Outside a For Each Row you can do it with dt.rows(intIndex).item(“Price”), where dt is the name of your datatable and intIndex is the row number. Kind regards, Anders
Apparently, the row.item(“Price”) didn’t work. I only have two columns in the excel one for pulling data and one where I want to wrte data(Column “Price”),
Your xaml is corrupted, but to solve this, you need to introduce an index variable in the For Each, so you can update the corresponding cell from Price. I’ve attached a working workflow. Just update the Get Text ‘Indicate on Screen’ and it will work.
It worked thanks so much. Can you tell me why my xaml was corrupted? Even I created a new same by introducing an index variable as yours and still didn’t work. Is there any reason for that?