Visio Guy

Visio Discussions => General Visio => Topic started by: mike@striatum.co.uk on June 26, 2020, 09:15:20 AM

Title: Data linking of shape hyperlinks
Post by: mike@striatum.co.uk on June 26, 2020, 09:15:20 AM
New to the Forum so apologies if this is the wrong place to post this...
I am creating Visio charts containing shapes with properties that link to an Excel data file, so that shape properties can be updated easily and automatically.  The Visio files will be published to the organisation as PDFs - users can click on a shape in the PDF and go to an intranet location.  All this seems possible for shape properties like text, size, colour etc.  However, Visio shape hyperlinks do not seem to be shape properties that can be linked to data.  Obviously, hyperlinks can be individually, manually, assigned for each shape but we're looking to link them to the data file. 
Seems like a simple ask.  Am I missing something?
Title: Re: Data linking of shape hyperlinks
Post by: Nikolay on June 26, 2020, 11:21:45 AM
If you set the type of the column in the linked Excel file to be "hyperlink" (or just enter an URL),
it should be automatically converted to hyperlink in Visio when you get the data from Excel.
I.e. it should "just work".
Title: Re: Data linking of shape hyperlinks
Post by: mike@striatum.co.uk on June 26, 2020, 03:16:01 PM
Regretfully I doesn't just work for me  :(
I can update properties from the Excel data file and they appear on in the shape properties window in Visio.  The shape text "John" works perfectly in this example.  The hyperlink (http://news.bbc.co.uk in this example) syncs with the Excel data file but never gets associated with the shape.
I've attached  screenshot.  Any help gratefully received as I am going nuts trying to work this out!
Thanks
Title: Re: Data linking of shape hyperlinks
Post by: Nikolay on June 26, 2020, 04:05:47 PM
Hmm.. How do you think with Excel exactly?
You are using "Link Data to Shapes", or "Quick Import", from the "Data" tab in Visio, correct?
Title: Re: Data linking of shape hyperlinks
Post by: mike@striatum.co.uk on June 26, 2020, 04:28:53 PM
Thanks Nikolay.  I'm using Visio Standard 2016 and Excel in MS Office Professional Plus 2016.  There is no Data Tab in "my" Visio.  I've been using View > Add Ons > Visio Extras > Database Wizard.  Thoughts?
Title: Re: Data linking of shape hyperlinks
Post by: Surrogate on June 26, 2020, 08:34:56 PM
Hi, Mike!
Quote from: Nikolay on June 26, 2020, 04:05:47 PM
You are using "Link Data to Shapes", or "Quick Import", from the "Data" tab in Visio, correct?
Visio Standard have not these tools. Only Visio Professional or Visio Plan 2!
Title: Re: Data linking of shape hyperlinks
Post by: Nikolay on June 26, 2020, 09:08:43 PM
Quote from: mike@striatum.co.uk on June 26, 2020, 04:28:53 PM
Thanks Nikolay.  I'm using Visio Standard 2016 and Excel in MS Office Professional Plus 2016.  There is no Data Tab in "my" Visio.  I've been using View > Add Ons > Visio Extras > Database Wizard.  Thoughts?

Switch to Professional (or subscription, aka Plan2)?  Or do the sunrise manually  :)
Title: Re: Data linking of shape hyperlinks
Post by: mike@striatum.co.uk on June 28, 2020, 03:45:29 PM
Thanks both.  Now have Visio Pro 2019 installed.  Different menus but still not able to connect Excel data to the hyperlink property of a shape so that, when clicked on, it opens a webpage.  Are there any demos / examples out there I can look at?
Title: Re: Data linking of shape hyperlinks
Post by: Surrogate on June 28, 2020, 05:26:53 PM
Hi, Mike!
Hope this video can help
Title: Re: Data linking of shape hyperlinks
Post by: Nikolay on June 28, 2020, 05:28:30 PM
Quote from: mike@striatum.co.uk on June 28, 2020, 03:45:29 PM
Thanks both.  Now have Visio Pro 2019 installed.  Different menus but still not able to connect Excel data to the hyperlink property of a shape so that, when clicked on, it opens a webpage.  Are there any demos / examples out there I can look at?

You need to use different technique when connecting to the data.
Don't use "Database Wizard", this is 25-years old functionality taken over from Visio 5.

There are lots of resources, how to connect Visio shapes to Excel data worksheet, including MVP series on youtube.

The basic idea is, you just connect your shapes with your Excel sheet;
when you pull the data, Visio creates hyperlinks automatically if the underlying property is a hyperlink property.
Title: Re: Data linking of shape hyperlinks
Post by: mike@striatum.co.uk on June 29, 2020, 02:16:11 PM
Thanks Nikolay, Surrogate
Resources were useful. I successfully had hyperlinks on the drawings as Data Graphics text / icons that were updatable from Excel, but could never create hyperlinks to make the actual shapes themselves clickable.  That can be done manually but not linked to data.  So I conclude this doesn't meet my needs, regretfully.  Coding something may be an option but that is certainly beyond me!
Thanks again.     
Title: Re: Data linking of shape hyperlinks
Post by: Nikolay on June 29, 2020, 02:38:23 PM
I believe you may be missing something. You want links exported to PDF to be clickable, right? That should work.
I've attached a simple example of 3 files, XLSX, VSDX, and PDF.

If you change the links in the XLSX file, and click "Refresh" in VIsio, the links are updated (you may need to point Visio file to that excel file after extracting it from zip archive)
If you export later as PDF, the links in PDF are updated as well.

Maybe this could help?
Title: Re: Data linking of shape hyperlinks
Post by: mike@striatum.co.uk on June 30, 2020, 01:40:29 PM
Nikolay, many many thanks!  I'm not sure what I was doing wrong but this has fixed it!  Your example demonstrates perfectly what I have been trying to achieve.  Much appreciated.  Mike   
Title: Re: Data linking of shape hyperlinks
Post by: mike@striatum.co.uk on June 30, 2020, 05:36:33 PM
Nikolay, regretfully it wasn't as simple as I'd hoped.  Your example worked perfectly.  Once I added more columns to the data I could not make the links work at all.  Quite frustrating....find attached files to make the point.  Any thoughts welcome.  Sorry for prolonging the agony....  Best, Mike     
Title: Re: Data linking of shape hyperlinks
Post by: Nikolay on June 30, 2020, 08:11:35 PM
Hi Mike,
I'm not quite sure what the issue could be. I removed the last empty row in Excel, and the third and fourth shape. Now it seems to work again  :o

I suspect this is automatic data-graphics doing. I would recommend you try turning them off (clear the checkbox to "Apply after linking data to shapes")
Visio does not guess right anyways in your case probably, and remove existing ones.
These ones, I mean:

(https://i.paste.pics/9G0UX.png)

I'm uploading the 2 files that work for me. Note that now there are even 2 hyperlink columns. "Link" and "SecondLink"