How to copy data row from 2 excel file and paste it on new excel file simultaneously and what to add in arrayrow in add data row


how to copy data row from 2 excel file and paste it on new excel file simultaneously and what to add in arrayrow in add data row

HI @madhavraichur25

Can you briefly explain by giving sample data of what input and output looks like?

Hi @madhavraichur25

Welcome to our community, so basically if your excel are not to large, you can append your data using for each row in datatable activity, then in your add datarow activity you can use this expression in the array row property

CurrentRow.ItemArray

make sure that the destionation datatable contains the same number of columns that the items you are adding

Regards

@madhavraichur25

You can use

Currentrow.itemarray

Cheers

@madhavraichur25

Welcome to the community

If you want to combine two different excel files into single

Then just use read range on one of the excels and use an append range on the second excel…so that the data read feom excel1 is appended at the bottom of excel two

You dont need to loop or do anything

Cheers

it should be like after each row from excel file 1 there should be data of excel file 2

@madhavraichur25

Is the row count equals in both excels?

If so create a new table dt3

Then read both the tables

And use for each row in datatable with dt1

Then use two add data rows with first add dta row with array row as currentRow.ItemArray

And second add data row with dt2.Rows(index).ItemArray…here index is the property in for loop…assign index variable to it

Cheers

how to assign index variable

@madhavraichur25

Please open the for loop properties…you will see an index there…assign a integer variable…with name as index or anything else

Cheers

do we need to use write range with by giving new file and datatable to it

@madhavraichur25

yes you have to

because its a new table dt3

cheers