Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Excel interpret the URLs in my CSV as hyperlinks?

Can Excel interpret the URLs in my CSV as hyperlinks? If so, how?

like image 951
Lior Avatar asked Jul 03 '11 13:07

Lior


People also ask

Can CSV have hyperlink?

Actual Results: CSV contains Excel formulas for attributes that use links, such as '=HYPERLINK("http://xxx/niku/nu#action:projmgr.projectProperties&id=5047176","4G Upgrade Readiness")'. Clicking in the cell may also generate a message to indicate 'Text values in formulas are limited to 255 characters'.

How do I convert data to hyperlinks in Excel?

On the worksheet, select the cell where you want to create a link. On the Insert tab, select Hyperlink. You can also right-click the cell and then select Hyperlink... on the shortcut menu, or you can press Ctrl+K. Under Display Text:, type the text that you want to use to represent the link.


4 Answers

You can actually do this and have Excel show a clickable link. Use this format in the CSV file:

=HYPERLINK("URL")

So the CSV would look like:

1,23.4,=HYPERLINK("http://www.google.com")

However, I'm trying to get some links with commas in them to work properly and it doesn't look like there's a way to escape them and still have Excel make the link clickable.

Does anyone know how?

like image 129
Dave Avatar answered Oct 19 '22 11:10

Dave


With embedding the hyperlink function you need to watch the quotes. Below is an example of a CSV file created that lists an error and a link to view the documentation on the method that failed. (Bit esoteric but that's what I am working on)

"Details","Failing Method (click to view)"
"Method failed","=HYPERLINK(""http://some_url_with_documentation"",""Method_name"")"
like image 29
P Hemans Avatar answered Oct 19 '22 13:10

P Hemans


I read all of these answers and some others but it still took a while to work it out in Excel 2014.

The result in the csv should look like this

"=HYPERLINK(""http://www.Google.com"",""Google"")"

Note: If you are trying to set this from MSSQL server then

'"=HYPERLINK(""http://www.' + baseurl + '.com"",""' + baseurl + '"")"' AS url
like image 13
arbit Avatar answered Oct 19 '22 12:10

arbit


you can URL Encode your commas inside the URL so the URL is not split across multiple cells.

Just replace commas with %2c

http://www.xyz.com/file,comma.pdf

becomes

=hyperlink("http://www.xyz.com/file%2ccomma.pdf")

like image 8
Jim Avatar answered Oct 19 '22 12:10

Jim