The idea of my automation to check these numbers one by one to my Masterfile and if it it’s exist in Masterfile I will delete the whole row that contained that number ?!
More Explanation
Iterate throw row in excel file that contains multiple numbers separate by space, I need to use for-each activity to check one by one ?
Read master file as Dt
For each row in excel:
str_var1 = row("colName")
assign: arr_var2 = str_var1.split(" ".tochararray)
For each val in arr_var2:
if (Dt.AsEnumerable().Any(Function(x) x("colName_MasterExcel").ToString = val)):
use: Remove datarow activity(currentrow)
Use Read Range activity to read you master data and save it to DT_1.
Use “For Each row in Datatable” activity and pass DT_1 in it.
Inside the loop use assign Activity and pass lv_Row_Value= Row(“ColumnName”.ToString.
use another assign Activity and pass **lv_Arr_String= Lv_Row_Value.Split(" "c).ToArray
Use For Each Activity and pass lv_Arr_String and Inside that use “IFstrong text” condition where you need to pass item.Tostring=Your_Number.Tostring and in then Use Delete Data Row Activity and give row as CurrentRow.
For Each (over Excel)
- Assign: cellValue = row("ColumnName").ToString()
- Assign: numbersArray = cellValue.Split({" "}, StringSplitOptions.RemoveEmptyEntries)
- For each val in arr_var2:
if (MsterDt.AsEnumerable().Any(Function(x) x("colName_MasterExcel").ToString = val)):
Then
use: Remove datarow activity(currentrow)