Compare two excel headers using VB.net

Rajnilari2015
Posted by Rajnilari2015 under VB.NET category on | Points: 40 | Views : 459
Public Function CompareXcelHeaders(headers1 As List(Of String), headers2 As List(Of String)) As String
Dim message = String.Empty
Dim result = headers1.Where(Function(x1) Not headers2.Any(Function(x2) x1 = x2)).Union(headers2.Where(Function(x1) Not headers1.Any(Function(x2) x1 = x2)))

Return If(result.Count() > 0, "Headers are not equal", "Headers are equal")
End Function

Comments or Responses

Login to post response