Find same data in different excel files and save them in a folder

Hi Everyone,
I am trying to find a candidate name which is present in different excel files, I want fetch the path of all that excel in which the candidate name is present and save that excels in a local folder.
can i get some help
Thanks in Advance

Hi @Arvind_Malik

welcome to forum :slight_smile:

Follow the below steps

  1. Use an assign activity to get list of all files in a folder
    arrFiles= Directory.GetFiles(folderpath,“*.xlsx”)

  2. Use For Each loop to loop through each item in arrFiles. Follow the below steps to perform in loops
    2a. Read the excel file using workbook/excel read range activity using item as filepath & store results in datatable, let’s say dt1
    2b. use the if condition with condition below
    dt1.AsEnumerable().Where(Function(row) row.ItemArray().contains(“candidateName”)).Count<>0
    if this condition is true, in then section use move file activity to move excel file to a specifc folder

Hope this is clear !

Kindly mark it as solution if it helps :slight_smile:

Thanks & Regards,
Nived N
2b.