Check Value from excel

Hi all ,

I have a query. I have value in assign variable and want to check ,that assign value exist in excel or not using if condition. when I tried It gives me error.
“Table Doesn’t have a primary key”.
Please help.

2 Likes

Hi @arpita2,
You could use Read Range to get data from the excel. then using For Each loop go through every cell parsing it to string. Finally do compare in IF activity to check it with value.

@arpita2,

Can you please follow my steps,

  1. Use Read Range activity to get the DataTable from your specified Excel file.
  2. Use For Each row and specify your DataTable variable in the value Text box. Use GET ROW Item Activity to get the value of the specified column.
  3. Use IF condition to find: rowValue.equals(myVaraible.toString())

I have created sample workflow your query. I hope it will solve your doubt :grinning:

FindValueInExcel.zip (8.3 KB)

Thanks,
Arunachalam.

3 Likes

Thanks @Arunachalam and @Pablito

for your help

1 Like

@arpita2,

Can you please mark as Solution, so that this window will helpful for our folks to get the info:grinning:.

Cheers

@arpita2 @Pablito @Arunachalam

  1. After reading the excel file into data table using the Read Range activity ( Excel Scope or Workbook)
  2. With Assign activity, Take that data table and perform the datatable.select like dtTemp.Select("[column name]=’"+ varSearchString +"’").copytodatatable
  3. Filtered data table or data rows are all yours
1 Like

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