hyperlinks and email addresses as links from CSV

  • Thread starter Thread starter Alan
  • Start date Start date
A

Alan

I have a program that outputs a CSV file. The contents include
fields with hyperlinks and email addresses. However, when I open the
file in Excel, neither the hyperlinks or email addresses are active
links you can click on. I tried adding "mailto:" in front of the
email address, but this did not work.

I have a couple of questions:

1. Is there anyway in a CSV to automatically make these clickable
links when I open in Excel?

2. Is there a way once I am in Excel of making a column contain
clickable links?

Thanks, Alan
 
Alan

You could use the HYPERLINK function like so

=HYPERLINK("Mailto:"&A1,A1)

Uses A1 as an example

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
www.nickhodge.co.uk
 
Nick,

Is there a way to get this to work in a CSV format? The comma
is a problem, resulting in

=HYPERLINK("Mailto:"&A1

in cell A1 and

A1)

in cell B1.

Thanks, Alan
 
Alan

CSV is a text format. The only way you may preserve it is by wrapping the
whole thing in ""

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
www.nickhodge.co.uk
 
Nick,
This still does not seem to work. When I do that

"=HYPERLINK("Mailto:"&A1,A1)"

to be explicit, then I get

=HYPERLINK(Mailto:"&A1

in Cell A1 and

A1)"

in Cell B1.
Thanks, Alan
 
Put all that formula in B1
Put the email address in A1

If you're copying from the message and pasting into excel, try selecting B1
first, then paste directly into the formula bar (at the top).
 
Dave,
Thanks, but I wanted to create a CSV file (a simple
format) with a program for Excel to use.

Alan
 
If you enclose the text in quotes, any embedded quotes have to be
doubled-up, so the complete text that has to appear in the file would be:

"=HYPERLINK(""Mailto:"" & A1, A1)"

(Where "A1" might be your e-mail address...not really sure whether you have
to hard-code it or what.)

Now whether or not this will work at all in CSV format, I don't know, but if
it does, that's how you'd do it. In a way, you're asking for polar
opposites...you want an unformatted file with what amounts to a form of
formatting in it.



Rob
 
I think you'll have to do some work.

You can either add that formula in the adjacent cell or you could run a macro
that adds the hyperlink (like Insert|Hyperlink).

Personally, I'd use the =hyperlink() in the adjacent cell. I like those better.
 
Back
Top