Hi every one,
my issue is campare the data (which is already in the excel sheet) and display the data whic is not exist in the excel sheet and i need to display the data in to Excel sheet next to the old data.
with the below code i getting the repeated rows,
can any one please help me,
thanks in advance
and my code is: Do While DatainOSPEckna.Read()
If DatainOSPEckna.Item("LastName") <> oWorkSheet.Cells(i, 2).value Then ' DatainOSPEcontacts.Item("LastName")
chkName = True
Else
chkName = False
End If
If chkName = True Then
''For i = 2 To (intLoop + 1)
oWorkSheet.Cells(intRow, 1).value = "Store Not Assigned"
oWorkSheet.Cells(intRow, 2).value = DatainOSPEckna.Item("LastName") & ""
oWorkSheet.Cells(intRow, 3).value = DatainOSPEckna.Item("FirstName") & ""
oWorkSheet.Cells(intRow, 4).value = DatainOSPEckna.Item("Contact_Type") & ""
i += 1
''Next (i)
End If
my issue is campare the data (which is already in the excel sheet) and display the data whic is not exist in the excel sheet and i need to display the data in to Excel sheet next to the old data.
with the below code i getting the repeated rows,
can any one please help me,
thanks in advance
and my code is: Do While DatainOSPEckna.Read()
If DatainOSPEckna.Item("LastName") <> oWorkSheet.Cells(i, 2).value Then ' DatainOSPEcontacts.Item("LastName")
chkName = True
Else
chkName = False
End If
If chkName = True Then
''For i = 2 To (intLoop + 1)
oWorkSheet.Cells(intRow, 1).value = "Store Not Assigned"
oWorkSheet.Cells(intRow, 2).value = DatainOSPEckna.Item("LastName") & ""
oWorkSheet.Cells(intRow, 3).value = DatainOSPEckna.Item("FirstName") & ""
oWorkSheet.Cells(intRow, 4).value = DatainOSPEckna.Item("Contact_Type") & ""
i += 1
''Next (i)
End If