Copy and Paste Data from "Excel Worksheet A" to Excel Worksheet B"

Hi UiForum! Appreciate if you could assist me in this :frowning:

Brief Breakdown of My Current Workflow:

i) Firstly, I will read my Outlook inbox and read information from desired emails and extract data i.e. Date, Amount etc into Worksheet A using Write Range Workbook Activity. (I have alr achieved this)

ii) Now that i have these figures in Worksheet A, i would like to copy and paste data from Worksheet A to Worksheet B based on date (see figure below). Though they are similar, the difference between worksheet A and worksheet B is that worksheet B has all the dates of the month listed down in its “Date” column i.e. 1-Nov-19 to 31-Nov-19, whereas Worksheet A would have a list of dates up till the latest date of when date info is extracted from Outlook as mentioned earlier, in this case, “5-Nov-19” which is also stored as a variable “DateA”.

iii) What i have done so far, is to use Excel Application Scope and Read Range for Worksheet A & B and create a Datatable for both. How can i now copy the data from the “5-Nov-19” row in Worksheet A to the same date value row in Worksheet B? Meaning if Worksheet A & B both contains “Date A” in this case “5-Nov-19”, then extract figures from “Date A” row in Worksheet A to “Date A” row in Worksheet B.

Looking forward to any help from you guys!

1 Like


Use Excel Applcation Scope
Read range in that read 1st sheet
append range mention sheet2
then give a row name match with

Cheers @R11 :slight_smile:

Hi Shriharsha,

How can i achieve the row name match? Thanks! and if possible could you provide a sample workflow?

For each row
or use get Row item activity and do the same

Hi Shriharsha.

Thank you for your help so far.

I am now stuck at writing an expression for the For each row activity. I have loaded both Worksheet A & B into 2 datatables respectively i.e. DT1 & DT2. Using the If condition, i would like to set my condition as “If DT1 contains (DateA); DateA being the variable that stores the row name, and that DT 2 also contains (DateA), then extract data from DateA row in DT1 into DateA row in DT 2”.

i have tried “rowA.item(DateA)=rowB.item(DateA)” but the error message is still present.

Looking forward to your help!



Can i get to know the error message please


It is a compiler error encountered when processing the expression.

In the syntax end use .tostring

Cheers @R11

Hi Shri,

for this Inarguement, can it identify variables? For example, row.item(VariableName).

I have tried this but it does not read. What are ways or how can i write an Inarguement to identify a particular variable in a row?

Hi @R11,

Check this link . It has the solution to copy the data one excel from another excel sheet.