I don’t really know how to explain or word it properly what I’m trying to do. However, I’ll do my best to properly word it so you guys can understand. I have two worksheets that I want to combine in one worksheet. I tried merge, join data table and append range but they didn’t satisfy what I was trying to do.
I have two excel sheets that I want to combine in one sheet. I’ll show an example image below and what output I’m trying to achieve.
Fundamentally speaking, the tables you are expecting to join column-wise, don’t have any common columns between them. That is the reason these table activities haven’t worked well.
If the robot were to join or merge the tables, what would be the reference to decide which row matches which?
If the sequence is already taken care of and all you want to do is just append the second table to the right of the first, you might want to use Append Range from cell “D3”
If you’re unsure how many columns the first table will have, then write some logic to find the next empty cell. Here is a forum thread to help you with that.
Note: This is just ONE way to achieve this. There is probably a better, more efficient way to do this. I share this approach so you may find use for it in your solution.
Hello, thank you very much for the answer. Yes, you are correct, I just want to append the second table to the right. I like the solution that you tried giving me. However, you mentioned that I can use Append Range from the cell that I like. May I know how can I do this? I tried checking both Append Range activities and I don’t see any cell or range properties in it. Can you help me or enlighten me about this, thank you again
You should use “write range” rather than the “append range” activity. Your main task is to determine which column you want to write your new range. This can be done in 2 parts.
Part 1 = count how many columns exist in the first datatable (dt1.columns.count) - it looks like you want a space between, so add 1 to the end of this.