I have to compare two datatable .datatable1 ,datatable2 . Match datatable2 value with datatable1…if values match leave them as it …if the values are not matching update with value from datattable2 and write in excel saying that how many rows are updated.
You can probably do something along the lines of:
Reading rows from both datables
for each row
if data1<>data2 then
data1 assigned as data2
counter = counter+1
then at the end just write the value of counter to the excel as that will be how many rows got updated.
How to compare two csv files