Hyperlinks

Coordinator
Apr 30, 2014 at 3:07 AM
Dinesh Kumar asked about hyperlinks.
So, for instance, I have the following VBA code, and I’m trying to get the C++ code right – using YOUR  wonderful XLL wrapers(ExcelX() ), but am not sure if the semantics of my call right.

===================================================
Function GetURL(cell As Range, _
Optional default_value As Variant)
'Lists the Hyperlink Address for a Given Cell
    'If cell does not contain a hyperlink, return default_value


If (cell.Range("A1").Hyperlinks.Count <> 1) Then
GetURL = default_value
Else
GetURL = cell.Range("A1").Hyperlinks(1).Address & cell.Range("A1").Hyperlinks(1).SubAddress
End If
End Function
===================================================
The ancient xll API does not have as much functionality as VBA. If you look at a cell that has =hyperlink("http://bing.com") the only thing you see is "http://bing.com"

Or maybe I'm misunderstanding your question.

Trying to get up to speed with the Excel Web App. I've finally managed to figure out how to call a JavaScript function to multiply a number by 2 without setting up a SharePoint server. MS seems to be throwing money at OneDrive now. Technology marches on. What an amazing world we live in.
Apr 30, 2014 at 10:19 AM
Edited Apr 30, 2014 at 2:17 PM
Image
Hi Keith, thanks for replying me.

I have included a link to a JPEG screen-shot of the VBA code(which works) in action.

Essentially, I need to extract the (HREF) URL(e.g. http://www.gobackpackingcom ) out of a hyper-link pasted in an Excel cell - Where ONLY the "Go backpacking" FRIENDLY NAME part of the hyper-link is visible in that cell).

If anyone knows how to do that, feel free to let us know.

Thanks again to Keith for your XLL library. LOVVE it's simplicity(of use) and speed. :)))

technology does march on, sometimes a little bit too fast for it's own good- based on various companies' own financial greed (too)... ;-)

As someone who works in the world of embedded C and C++ which runs most of the devices, platforms of this world- I find some of the web technologies primitive in their offerings..

Peace on Earth,

Dinesh
Apr 30, 2014 at 8:59 PM
Edited Apr 30, 2014 at 9:01 PM
For anyone interested in learning(or mastering- not me), Excel API development using C/CPP, please find below a very very handy book(in PDF format, with everything there is to know about Excel API and development of Add-ins using Excel API in C and C++. Awesome book for of the majority us out there!


http://www-f9.ijs.si/~ilija/slike/cs/aaa.pdf



Lots of valuable info and code snippets.

enjoy!