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

6 vues (au cours des 30 derniers jours)
Robert Royer
Robert Royer le 4 Juin 2018
Commenté : Varun Garg le 6 Juin 2018
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
Robert Royer
Robert Royer le 5 Juin 2018
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!
Varun Garg
Varun Garg le 6 Juin 2018
Glad it helped!

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Data Import from MATLAB dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by