It didnt work as Excel was not formatting to Hyperlink,
Through a youtube video i got a code
code is provided Below
Dim xlworkbook As Microsoft.Office.Interop.Excel.Workbook
Dim xlworksheet As Microsoft.Office.Interop.Excel.Worksheet
Dim xlApp As Microsoft.Office.Interop.Excel.Application
Dim xlRange As Microsoft.Office.Interop.Excel.Range
Dim xlLastRowNumber As Long
Dim i As Long
Dim title As String
Dim url As String
Try
xlApp = New Microsoft.Office.Interop.Excel.ApplicationClass
xlworkbook = xlApp.Workbooks.Open(in_FilePath)
xlworksheet = CType(xlworkbook.Sheets(in_SheetName), Microsoft.Office.Interop.Excel.Worksheet)
xlLastRowNumber = xlworksheet.Range(“B” & xlworksheet.Rows.Count).End (Microsoft.Office.Interop.Excel.XlDirection.xlUp).Row
xlRange = xlworksheet.Range(“A2:B” & xlLastRowNumber)
For Each row As Microsoft.Office.Interop.Excel.Range In xlRange.Rows
For Each cells As Microsoft.Office.Interop.Excel.Range In row.Cells
If cells.Address.Contains(“A”)
title = cells.Value.ToString
End If
If cells.Address.Contains(“B”) Then
url = cells.Value.ToString
title = “Hotel Name” & cells.Value.ToString
Dim displayText As String = “Click Here”
Dim hyperlinkText As String = displayText & " " & title
xlworksheet.Hyperlinks.Add(cells, url, Type.Missing, displayText, title)
Debug.Print("URL: " & url)
Debug.Print("Title: " & title)
Debug.Print("Hyperlink Text: " & hyperlinkText)
End If
Next
Next
Catch
Finally
xlworkbook.Save
xlworkbook.Close
End Try