Excel automation between two sheets

am unable to compare two sheets …can someone help me !!
Basically ,if the data between the two sheets is micmatching then i need to comment out a line.But am unable to do it.

Hi @Suthari_RohithReddy

Use the Excel Application Scope activity
Use the Read Range activity output:dtSheet1
Use the Read Range activity again output:dtSheet2
USe two for each row activities to iteratate both sheets
If rowSheet1(“Column1”).ToString <> rowSheet2(“Column1”).ToString Then
i need to comment out a line
End If

Hope it helps!!

i tried this …but in the sheet all the column is filled with same comment…
can we connect in meet for a while ?



Read Range (Sheet1) → Output: dtSheet1
Read Range (Sheet2) → Output: dtSheet2

For Each Row (row) in dtSheet1
Assign: isMismatched = False

For Each Row (row2) in dtSheet2
    If row("Column1").ToString <> row2("Column1").ToString Then
        Assign: isMismatched = True
        Break (inner loop)
    End If
End For Each

If isMismatched = True Then
    Set Range Text: range = "A" + row.RowIndex.ToString, text = "Commented out"
End If

End For Each

Thank you