How to check for column values and update into another excel

Hi all,
How to check for column values and update in another excel file. If the file1 has “yes” keyword in a column then few columns values need to update to fiile2. How to do this, please guide me on this.

Hi @lakshmi.mp

You can use the LINQ Expression to achieve this. If your data is not confidential share the input and required output data file with us.

Or you can use the Excel activities.

@mkankatala , which activity need to use. How to check column values…

You want to compare the columns or you are talking about the UI Automation… @lakshmi.mp

@mkankatala , want to check for keyword if that keyword is present then that particular rows data need to be added to another file. Another file will be having those columns. Want to compare the columns based on keyword.
If yes data should update in another file, else do nothing.
I used for each with if condition but not working.
If condition

row(“Require”).ToString.Contains(“yes”)

but not working.

Okay got it… @lakshmi.mp

Share your Input and output file if those doesn’t have the confidential information.

@mkankatala, thanks for the support. Able to achieve. I used filter data table.
“Column name” = “yes”

Yes you can achieve it by filtering using Filter datatable. If you want to append the filtered data to the other existing excel you can use the Append Range workbook activity@lakshmi.mp

Hope it helps!!

@mkankatala Yes, I have used append range workbook to update values…

1 Like

Okay @lakshmi.mp

With out filter datatable you can use it by using the LINQ Expressions,

- Assign -> dt_Output = dt.asenumerable.Where(Function(X) X("Column Name").toString.equals("Yes")).CopytoDatatable()

Hope it helps!!