[Baypiggies] adding hyperlinks to output

Eric Walstad eric at ericwalstad.com
Wed Jan 12 20:35:25 CET 2011


On Wed, Jan 12, 2011 at 11:15 AM, Vikram K <kpguy1975 at gmail.com> wrote:
> thanks for your response. I tried using the anchor tag but Excel is not recognizing it as a hyperlink. This is my test script:
> import csv
> fout = open ('test.csv', 'w')
> writer = csv.writer(fout)
> writer.writerow(('Gene Link', 'Protein Link'))
> writer.writerow(('<a href="http://www.ncbi.nlm.nih.gov/gene/9101">USP8</a>', 'bla'))
Ah, looks like an Excel issue.  Googling for Excel hyperlink, I see it
uses the 'hyperlink' function - have a look in the help file for that
function for details, but this might get you close:
USP8)', 'bla'))


More information about the Baypiggies mailing list