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

1 Ansicht (letzte 30 Tage)
Robert Royer
Robert Royer am 4 Jun. 2018
Kommentiert: Varun Garg am 6 Jun. 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 Kommentare
Robert Royer
Robert Royer am 5 Jun. 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!

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Data Import from MATLAB finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by