How to know if the Specific column contains particular value or not

#1

I am reading Complete excel. But I need to write if condition for column F (EMPID) contains S1234. Kindly help me on this?

#2

Hi @srujanch.
Inside the For Each Row activity, add a If activity and use this condition:
row(“EMPID”).ToString.Contains(“S1234”)
Hope this helps :slight_smile:

#3

@srujanch,

can explain little bit more about your requirement so we can help on that.

there are several ways to find out.

  1. if you want to know whether any rows contains value 1234 in eniter datatable
    use filterdatatable activity - under filter rows wizard - give your column name and also the value you looking for so you can find the results.

image

  1. other way is just use select query like DataTable.select("EMPID like ‘$1234’ ")
    Thanks,
#4

Thank you for the Reply. I need to write if condition For the Attached Excel File for Column F. But i need to read entire excelFileToProcess.xlsx (9.8 KB)

#5

Thank you for the Reply. I need to write if condition For the Attached Excel File for Column F. But i need to read entire excelFileToProcess.xlsx (9.8 KB)

#6

I need to write IF condition to check if the F column Has “TBD” or not

#7

Hi,

You can write as,

  1. read the excel data by using read range activity.
  2. use, foreach row and inside the foreach use if condition as “if(row.item(5).equals(“TBD”))” then true, complete your true condition or proceed with your else condition.

Thanks,
Sid

#8

can you explain bit more like
what is the next step after you check the IF condition.

After i checked your excel i understood like if the column f has TBD you want to do some actions…

for that you can use my this.