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

8 views (last 30 days)
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 Comments
Robert Royer
Robert Royer on 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!

Sign in to comment.

Answers (0)

Categories

Find more on Data Import from MATLAB in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!