How can I create an Excel hyperlink with specific display text?

I have a MATLAB script that saves oscilloscope waveforms as .xlsx files, and I would like to have the script hyperlink the address in a database file(for organization). And using the example code posted here, I was able to link to the files. I would really like, however, to be able to format the display text of the hyperlink (much like I did in this post) so the entire file address doesn't show.
I believe the command is supposed to be something like:
excelsheet.HyperLinks.Add(Range, Address, Description, DisplayText);
but what I get is "Address - DisplayText"
Any help is greatly appreciated!

3 commentaires

I don't have experience with sheet linking in MATLAB but I think this link might help.
Yes, that link was extremely helpful! Thank you! I wasn't including the optional subaddress, which was causing the following parameters to be misinterpreted.
The line I posted in my question should actually be:
excelsheet.HyperLinks.Add(Anchor, Address, SubAddress, Description, DisplayText)
Thanks again!
Glad it helped!

Connectez-vous pour commenter.

Réponses (0)

Catégories

Produits

Commenté :

le 6 Juin 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by