Merge Table Not Joining Columns Side by Side

Good afternoon all,

I have the following datatable:

Due to the interactivity of the datatable, I can only scrape these columns one by one. So I have to scrape the date column, followed by the pay code, followed by amount, etc.

Thus, I have a number of merge datatable activities that combines all of these columns into one datatable.

However, when I go to write this datatable to an Excel sheet, I see the following:

As you can see, the columns aren’t joined together perfectly. The values are offset down by the length of the first column.

Do you have any idea why this is happening?


Usually, you’re joining datatable on matching values. If you want to use an their “order of appearance”, you should add an “index” column and use it for the join.

Or you might loop from 0 to numberOfRows - 1 and populate you new datatable with related row on each parts (or iterate over the first part with a ForEachRow and .use the ouput “index”)

Or you can build your final datatable, add rows with first column value and ierate over each row to update each other “cell”.

1 Like

Another option is to use skip and take and slice down the blocks

first column we do find the segment size
second col. skip rows with the length of segment size and take rows within the length of segement size
third col: rows to skip = 2*segement size, rows to keep = segment size

In case of you need more help, we can help you e.g based on your sample data.