Excel 1 contains information about missing data, and which column it should be added to another excel file let’s say it has excel 2, missing data needs to be entered in the specific column in excel workbook 2, both the excel sheet will be having patient id as common based on that we need to add missing data to a specific column in excel 2

so how it can be done???

can you share the sample for both excel?

Below should be the approach

Load both excel data in Datatables, dt1 and dt2

loop through dt1, inside it use lookup datatable, mention the row(“Patient ID”) as lookup value and datatable name as dt2, store the output row value in a variable intRowInDt2

Then use If condition, if the intRowinDt2 >= 0, then, you can add the desired data from dt1, say ColumnOfDt1ToBeAdded, in dt2 in the column specified in dt1

Let’s say, in dt1 the column name is stored in a column, ‘TargetCol’ then simply use assign activity to enter the row element from dt1 in that column of dt2.

row(intRowIDt2)(“TargetCol”) = row(“ColumnOfDt1ToBeAdded”)

Hope this helps!

Can you share a sample excel sheet how it looks like and what is the output you are expecting

Thanks

This is the excel sheet, you gotta check if it’s verified then you in the “DataGap” column where the details will be mentioned, which column the data will be missing in excel workbook2. You gotta add data from the col “Input corrected data” to the respective col in excel workbook2.

This is the excel sheet, you gotta check if it’s verified then you in the “DataGap” column where the details will be mentioned, which column the data will be missing in excel workbook2. You gotta add data from the col “Input corrected data” to the respective col in excel workbook2.

got it

The above approach mentioned will work on this, did you gave it a try?

Thanks, but your approach works for a single col updation, how can you generalise for all the missing data to be updated since each time col changes

why?

We are not having anything static, everything is taken from excel, you csn share the xaml you created and Il try to correct it.

That will work for the scenario you mentioned. If there’s something else too, you may mention that too

Thanks a lot, Main.xaml (17.0 KB)

i have attached sample xaml file, can you add your logic to it, i wasn’t able to understand it (logic part) after the if statement

This topic.

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