Could you try the below Steps :
-
Read the above sheet’s First Column using
Read Column
Activity. Assuming that theService Number
will always start from that specific position (A2). The Output will be a collection which will contain all the service numbers present in the column, let the output variable be named asserviceNoList
. -
Next, Read the below Sheet using
Read Range
Activity. Get the Output as Datatable, sayDT
. -
Next, Use an
Assign
Activity and use a Linq Query to Filter only the rows which contains the Service numbers present in the above sheet.
DT = DT.AsEnumerable.Where(Function(x)serviceNoList.Any(Function(y)y.ToString.Trim.Equals(x("Service No").ToString.Trim))).CopyToDatatable
- After the Filtering, The
DT
variable should contain only the rows that has the service numbers which match the service numbers in the above sheet. We could then Write this datatable value to a new sheet usingWrite Range
Activity.
To handle the Errors on Direct CopyToDatatable
you could check the below post :
Let us know if you are still facing issues.