Hi all,
I have a doubt. I have one excel with different columns. Like Sl no, Date, Time etc. I have another excel with columns like Sl no, month etc. I have merge the Sl no column if 1st excel has 1 to 100 rows and when I am pasting 2nd excel the rows should start from 101 how to do this.
Please help me
Use the “Join Data Tables” activity to merge the data from dtExcel2 into dtExcel1 based on the “Sl no” column. Set the join type to “Full Outer Join” to include all rows from both DataTables.
For Each Row in mergedDataTable
If Not String.IsNullOrEmpty(Row(“month”).ToString.Trim) Then
Row(“Sl no”) = Convert.ToInt32(Row(“Sl no”)) + 100
End If
If I use merge data table in Sl no after 100 it’s coming again 1, 2 ,3 and so on but I want it to come as 101,102,103 etc and the rows will not always be 100 they may vary like some times we may have 50 rows also
(From row In dt.AsEnumerable
Let indexValue=(dt.Rows.IndexOf(row)) + 1
Select dt.Clone.Rows.Add({indexValue,row(“Date”),row(“Time”)})).copytoDataTable
since your column slno is based on index, you can implement this after merging 2 datatables…