i have two excels. If a certain condition is met i need to copy a row from the second excel to the first. The problem is that the second excel have different order. Also the first 3 columns must stay the same(In the first excel). I’ve tried to search for other question like this but i didn’t find something like i want to do.
all the columns in the second excel(the table below) have to go in the first excel(the table up). And i was saying the differ in order it’s like Column0(second excel) --> Column5(first excel)
Column2 --> Column8
and like that…
I forgot… i have to write a new row in the first excel under all the other rows, filling it with the data from the second table.
Ok Give me few mins buddy
Let me check once
Ok thanks @Palaniyappan
@Palaniyappan can you still help on this problem?
difference in column and its count is some how the issue we are facing buddy
we can get the value from second excel file under the required columns like this
–use excel application and pass the file path of first file as input
–use read range and get the output with a variable of type datatable named dt1
–use another excel application scope and pass the file path of second file as input
–use read range and get the output with a variable of type datatable named dt2
–use a for each row loop and pass the dt2 as input and inside the loop
use a assign activity to get the value of the required column
out_value1 = row(“yourcolumnname1”).ToString
out_value2 = row(“yourcolumnname2”).ToString
–still being inside the for each row loop use a add datarow activity and mention the above obtained values in the arrayrow property
–but how we mention matters, if we are clear with the order of the column where we want to enter the above obtained values then mention in the arrayrow property of add datarow without empty values in the place i.e., to the column where we dont have value to mention like this, suppose we dont have value for column3 then put “” means null value with the rest columns mentioned with the above variable as input
Kindly try this and let know for any queries or clarification
Do correct me if i have understood the query wrongly