[Baypiggies] adding hyperlinks to output
Max Slimmer
max at theslimmers.net
Wed Jan 12 20:51:40 CET 2011
As far as I can tell there is no way to include formulas in csv
however you can try:
Assuming the CSV file contains URLs like Http://support.microsoft.com
open the csv file in Excel.
in the column next to it put in a formula like
=Hyperlink(A1)
then drag fill down the column.
Max Slimmer
eMail: max at SlimmerSoft.com
phone: 707 703-4396
On Wed, Jan 12, 2011 at 11:35 AM, Eric Walstad <eric at ericwalstad.com> wrote:
> Vikram,
>
> 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:
> writer.writerow(('hyperlink("http://www.ncbi.nlm.nih.gov/gene/9101",
> USP8)', 'bla'))
>
> Eric.
> _______________________________________________
> Baypiggies mailing list
> Baypiggies at python.org
> To change your subscription options or unsubscribe:
> http://mail.python.org/mailman/listinfo/baypiggies
>
More information about the Baypiggies
mailing list