How to combine the sheet "scrap" to excel db?

How to combine the sheet “scrap” to excel db? Which one should I use? Merge datatable or join datatable?

Hi @yahmpt
It depends on what is the expected final outcome of the merging of the sheets. If you’re simply trying to append the ‘scrap’ sheet to the ‘ai’ sheet, then you may skip the join or merge data table activities.
Note: in this case, we’re only talking about appending data to the main sheet, i.e. ‘ai’.
Judging by the first row in each sheet, the top row appears to be header row, where your column A and column B are swapped. If you refer to them by column names, then their sequence is immaterial.

  1. Simple append:
    You can use a Read Range and Append Range activities sequentially to append the range.
    Note: You only need to read one worksheet as datatable. However, you will need to use ‘SetOrdinal’ method on the column to alter the sequence of columns A and B.
  2. Use Merge Data Table instead of Join
    I personally would use Merge Data Table as the MissingSchemaAction option will allow me to handle the one extra column in the main sheet ‘ai’.
    Note: You will need to scan both worksheets as datatables in this case.

Thanks for the reply…well, actually I want to achieve like this, four sheets in the same excel, it’s my fault that my description isn’t clearly enough :disappointed_relieved:
image

This is very easy.

Use Excel Write Range activity.
Go to the very end of this link to see an example of how to do it. :slight_smile:

I use write range but it combine all together :sob:

And the example didn’t offer what I want… :sob: