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 件のコメント

Varun Garg
Varun Garg 2018 年 6 月 5 日
I don't have experience with sheet linking in MATLAB but I think this link might help.
Robert Royer
Robert Royer 2018 年 6 月 5 日
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 2018 年 6 月 6 日
Glad it helped!

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeData Import from MATLAB についてさらに検索

製品

質問済み:

2018 年 6 月 4 日

コメント済み:

2018 年 6 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by