Excel automation for 2 files

Hi All,
I need to find the keyword from 1 excel to another and if keyword found in 2nd excel then I need to copy the row except that keyword and paste it into 1st excel in front of that keyword and if it is not found then need to mention “not found”
Please let me know if you have idea on this. Thanks

Hi @Shivi

Use read range inside excel scoop and a for each loop to store the data inside a table than use an if condition to check if the value you are looking for exists than write range or cell…

I was doing in same way, but there is some issue with row index.

Clarify please

Below is the process I am doing-

  1. Reading the 1st excel file and using for each row, I am fetching the values of a column in a variable which I need to match in other excel file
  2. after this I am reading the other excel file and using for each row, using if condition if value is present in this file or not
  3. After this If value is present then I will copy the data of that row except the value found and while pasting the data in 1st excel I am facing issue.

Hi @Shivi,

To find the keyword in excel you can use this activity which have attached it below.It has property called Row Indexes . Using it can get the row index.

To Copy and do the paste you can use this below activity.

Regards
Balamurugan.S

These activities are not present.

What’s the issue you facing when you try to past the data ?

Hi @Shivi,

I am not understand . What it means present…

Balamurugan.S

Row index, I am copying the data from the excel and want to paste in respective row of other excel sheet, but data is not getting copy to correct row.

@Shivi Can you share your xaml file ?

Test.xaml (31.5 KB)

@Shivi

I can’t see much on your xaml file. As i unterstand, your issue is that the rows you copied, want them to be sorted as a specific order on the new excel file right ?

Hi,
From 1st excel I have to check column A values with Column A from 2nd excel and if col A value(from 1st excel) not present in col A of 2nd excel then I need to mention “Not found” in col N(same row) of 1st excel.
Problem I am facing is that “Not Found” is getting print in every row.

@Shivi

First check wither your first condition works correctly, than if it does check your last IF condition, maybe that’s the issue.

If it is present then it is printing in correct row, but I am facing issue in case if it is not present .

@Shivi

Yes that’s why i asked that you check your first part of your code, so that to see if it works correctly, than if it does, check your last condition. I think the issue comes from one of the two parts.

Excel2.xlsx (8.7 KB)
Hi,
I have attached the 2 excel files, so if serial no. (from excel1) present in excel 2 then I need to copy the whole data of respective serial no. and paste it to excel 1(respective serial no.) and if it not present then I need to mention “NOT FOUND” in column Remark(excel1)

@Shivi

I unterstand, that’s why you have to check your code, to see where is the issue? first part of your code or second part? Do the steps i told you before, either the filter you did ain’t working well or your last if condition ain’t working well.