Copy specific column from one excel to another excel last row with specific column

Hi, I need help on Column A,B and D at ‘Example’ sheet

paste those column at last row of Column A,C and E at ‘Destination’ sheet.
image

Anyway on how to do this? Thanks so much
Example1.xlsx (12.7 KB)

Hi

Hope the below steps would help you resolve this

  1. Use a read range activity and get the datatable as output named dt1 of first sheet

  2. Then use another read range activity and get the output as dt2

  3. Now use a FOR EACH ROW activity and pass dt1 as input and inside the loop use a add Datarow activity with ArrayRow mentioned as
    {CurrentRow(“Item”).ToString, String.Empty, CurrentRow(“Tax Rate”).ToString, String.Empty, CurrentRow(“Value c”).ToString}

And datatable mentioned as dt2

Instead of string.Empty you can also keep any string value if you want

Cheers @mashy2

hi, in step 2, read range from another sheet ‘Destination’?
Then how i can write range in last row?

Yes that’s right

Add Datarow activity will usually write in the last row of the datatable

Cheers @mashy2

hi, i have tried but somehow it also add original dt2 value, is there anyway to prevent this

You want to overwrite or you want to append at last row in dt2

@mashy2

thanks, i got it already
btw, is there any way without using for each row? cause if got many data, feel kinda slow need to go trough 1 by 1

Hmm I feel it won’t take more than 5-6 seconds
Is it exceeding more that that

Cheers @mashy2

Any further queries on this topic

@mashy2

its okay, tqvm

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.