Dynamically extract data table from x amount of excel files and merge them

Hi,

Is there a way to extract data tables from an unkwon number of excel files and then merge those data tables replacing the values of the element that have - or N/A?
Example:

Table 1 :

Value1 | value2| value3 | value4
N/A | 1222 | - | 299
100 | - | 123 | 400
- | N/A | 333 | 111

Table 2

Value1 | value2| value3 | value4
100 | - | 500 | NA
100 | 200 | N/A | 400
300 | 500 | 333 | 111

Result

Value1 | value2| value3 | value4
100 | 1222| 500 | 299
100 | 200 | 123 | 400
300 | 500 | 333 | 111

Hi @brandon_araya

And when we have both tables filled for the same element, you sure it’s going to be the same value?

1 Like

Yes ,

this is based on historical data extracted 8 times a day, the only thing that changes is the aviability of the data, having N/A where there is none at that hour and - when the service is unaviable

Regards,

I think the kind of merge that you’re looking for is not built by default into some activity in uipath or even a function in .net, so the most forward way in this case is to loop through every row and then for each row you use some (if - else) statements with the condition of IsNumeric(row(i)) to evaluate if the element is a number or not and then assign your result dataTable with the corresponding value.

Hope this helps,
Reda.

Thanks,

I’ll try that, it going to get really messy with multiple dt verifying each other to create the Last one.

A solución might be to use a python script to do the work

Regards

I’m there with you on this one, a python script would be much easier to come up with.