Merge Data Tables Horizontally

How can I merge 2 data tables side by side if they don’t have anything in common to join them?

@scott.luntz One possible method would be to update the two tables with an Additional Column.

Update the values incrementally such that 1st value in first datatable will match first value in second datatable.

This can be done using for Each Loop.

Then you can use Join Datatables based on the additional Column that you have added to it.


Another solution is to use string manipulation as the following.


result = String.Join(vbcrlf,text1.Split(vbcrlf.tochararray,StringSplitOptions.RemoveEmptyEntries).Zip(text2.Split(vbcrlf.tochararray,StringSplitOptions.RemoveEmptyEntries), function(x,y) x+","+y))

Note : dt1.Rows.Count must be same as dt2.Rows.Count


Could you attach the workflow for this?