I am trying to create a CV entry system where I need to save an image location in excel (i.e. create a hyperlink in one of the cell in excel) which will allow me to open the picture file directly from Excel.
Dim TextFile As String = "E:\Tests.xlsx"
If File.Exists(TextFile) Then
File.Delete(TextFile)
End If
Dim oExcel As Object
oExcel = CreateObject("Excel.Application")
Dim eBook As Excel.Workbook
Dim eSheet As Excel.Worksheet
eBook = oExcel.Workbooks.Add
eSheet = oExcel.Worksheets(1)
' I want to create a hyperlink in a cell excel file to point at a image location in drive
eSheet.Name = "Test File"
eBook.SaveAs(TextFile)
eBook.Close()
eBook = Nothing
oExcel = Nothing
here is the code that will help you to create hyperlink in excel file