Search code examples
excelcsvexport-to-excelexport-to-csv

How to replicate an anchor tag in excel


im having an excel (csv) like this

column1  link
yahoo    <a href="www.yahoo.com">Yahoo</a> 
google   <a href="www.google.com">Google</a>     

is there any way to show link column behave like normal anchor tag i mean it shows

column1  link
yahoo    Yahoo (clicking it should redirect) 
google   Google 

i can use macros or any tips while exporting this in csv


Solution

  • A CSV file is in fact a text file so there is no possibility to add anchored links to it. The only thing you can do is parse the csv file when opening it requiring VBA somthing like this:

    ActiveSheet.Hyperlinks.Add Anchor:=YOUR_CELL_HERE, Address:= "http://google.com", TextToDisplay:="fwefwefw"