Compare string with excel column values

  1. I have list of customer names in variable
  2. I have one excel contains few customer names in one column
  3. i wants to check that variable is prsent in excel or not if yes then i wants to remove that customer file from dictionary
  4. so for this what can i do (if condition)

@Anil_G can you help me?

Hi @pravin_bindage

For each list item and check if item=dic[item] then leave otherwise dic.remove(item)

how to read that excel column value

@pravin_bindage read range and using each row in the data table
if condition currentrow(“column”) is item Then add it to another data table by using add datarow activity

@pravin_bindage ,
You have to read excel using Read range, and then use a lookup datatable activity in which you can pass your variable for looking up, if that value exist then the output of lookup datatable will contain value , by checking that output in an if condition you can get to know whether variable is found in the excel or not

1 Like

what’s wrong with this syntax

Before trim add .to string and try in both sides

No still same error throwing

Try this

i just wants to compare current row value with all values in column of different datatable

@Anil_G can you help me please


Please use filter datatable with the column name and the variable as the value

and then use a if condition to check the count dt.rowcount>0

or use linq

dt.AsEnumerable.Where(function(x) x("Columnname").ToString.Contains(Variablename)).Count>0

Please mark the solution if resolved else happy to help


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.