Hi, please bear with me as I am quite new to UiPath. It’s a small issue but I’ve been puzzling over it for a while.
I am trying to merge 3 datatables using “No” as the PrimaryKey. “No” is a number prefixed either by an S or T. So far I’ve managed to read them as 3 DTs, used regex to replace either S or T for DT1, and then assigned “No” (e.g. 1001, 1002) as the PrimaryKey. I can then merge the 3 DTs.
But my problem is that if I do this, in the merged DT, “No” shows up with only the numbers, without the S or T. How can I merge them so that it shows up as the desired output below instead?
Quite simple. Add a new column in which you store the numeric part and do the merge on that one.
Also, there is no need for a regexp, just eliminate the first character.
I’m really sorry, this is all new to me so I still don’t get how to apply this. Invoke VBA only works in an excel scope right? Which excel sheet do I invoke it in?
You misread. The headers are not separated from the values by a new line in the actual values, but if you check the detail you can see this is right
Looking again at your request, you want to join tables, not to merge them.
Merging would mean they have the same columns and you put the tables one “below” the other.
Please check attached test5.xlsx (7.4 KB) Main (3).xaml (12.1 KB)
Thanks! But I’m afraid the workflow doesn’t work for me I suspect because I don’t have the Join Datatables activity. I’m running an old version of Uipath studio v 2018.2.3 at work and I’m not allowed to upgrade it sadly. Is there another way to join the datatables based on a common column that doesn’t use Join Datatables?
Additional question : where do you take your data from? If it’s from a database, it’s easier to do all the joining in sql, instead of post processing in UiPath.
Yep, definitely no Join Datatables activity. The data is just from multiple excel files. Anyway I’ve since expanded on your example and found a workaround (basically by adding and renaming and then removing extra datacolumns etc.) , which may not be the most efficient but it gets the job done. Thanks for your help!