You can get the range as datatableMerged.Rows.Count and then you can use add data column to add the data you want to within the for each row so that it will add the required column before merging the next datatable @smita.mobifly
As per my understanding, this is an overwrite issue.
While adding a new column in the second excel, the value is been overwritten.
In this case, please be very cautious and alert regarding the order of the flow and the executing sequence.
Also please ensure that adding new column range is in place.
In this case we need to add datacolumn while taking value from each excel as a datatable
Hope this steps could help you resolve this
—inside the for each loop after getting the datatable from excel with read range and getting the output with a variable of type datatable named outdt
—next to this use a activity called ADD DATACOLUMN where mention the datatable where we want to add the new column and mention the columnname within double quotes so that it will get added at the last with that name
—now we can add value to that column
And doing this for all
—Final all we can merge so that we won’t miss any value of a datatable
Kindly correct me if I m wrong with question and try this, let know for any queries or clarification