How to fill Excel table basing on other table's cell values

Hello!
I have a problem: I have an excel file with columns Products and Prices, and other that has the same, but all Prices are 0. I want to update these prices, e.g. if product exists in both files, change its price from 0 to value from a specific cell in file 1. How can I do it? Products names order is different in both files, and not all products from file 2 exist in file 1.
Capture3

Hello @Marcel_P ,

Welcome to UiPath Forum!

We can also do it by a Linq query which will check if the Product in Data Table 1 is matching with the Product in Data Table 2.
If its matching then lets take entire row rather than updating the cell value of DT2 (as its result will be same).

outDT = (From R1 In Dt1.AsEnumerable From R2 In Dt2.AsEnumerable Where R1.Item(“Products”).ToString.Trim.ToLower.Equals(R2.Item(“Products”).ToString.Trim.ToLower) Select R2).ToArray.Count >1 Select R1).CopyToDataTable()

Regards,
Rohith

Hi @Marcel_P

Check out the XAML file

FourmTest.xaml (17.6 KB)

Test.xlsx (8.6 KB)

Regards
Gokul

@rohith.prabhu thank you very much!

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