How to put data from a column of Excel sheet to list of string in

Hi Team,

I have multiple workbooks stored in folder with the column name as “Territory”.

I want to store this value into a data table with variable as list and then apply if condition to match with different variable as List_checked_value.
If it matches with the value if then will perform different action and rest, it will give output as “not matched”

Hi @Vivek_Pandey2
you can try below sequence:

  1. For Each file in folder Activity → to get all excel files in your folder and start to iterate on it one by one.
  2. Excel scope Activity.
  3. Use excel Application activity → you will use the CurrentFile in the location.
  4. read range activity → to select the needed column to be used later.
  5. create for each data table activity → add the output datatable of above activity in this one.
  6. inside it you will use if activity and make the needed logic on it like currentrow(“Territory”).equals(“the needed value you will need”) in true sequence you will add the actions

Please try above and if there is any issue update us again :slight_smile:

1 Like

hie @Vivek_Pandey2 if you have multiple sheets in a single excel sheet and you want to get all the sheet and use Excel application scope and get workbook sheets activity and use one for each to get all the sheet from the excel… and the use one read range activity and store their data as dt(dataTable)variable output . then use for each row activity and finally use if condition to match the value is equal to true or not …
and if you want to read multiple excel file from the folder you can use for each file in a folder.
cheers Happy Automation

I tried to do so but getting an error:

Logic Design:

@mahmoud.zaky Have resolved the error.

Thanks for the guidance

1 Like

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