Write an url list in one column of a text file

4 views (last 30 days)
I want to write a text.file with several columns. In the last one, I want to write an url so that ,when I open the text file and click on it, I get redirected to the website.
In the command window, this works:
disp('<a href = "https://www.mathworks.com">The MathWorks Web Site</a>')
But if I "fprintf" a string array of strings with that format, it writes the whole string on the file and doesn't create the hyperlink.
Also, "websave" doesn't work because I want to write other columns:
fprintf(fileID_diametros,'%10.1f\t %15.3f\t %19.3f\t %19.1f / %.1f\t %130s \n',[r1*2000;r0*2;esp_max;r1*2000;d_inteiro;rg_website]);
rg_website is the string array of urls.
How can I solve this?
Thank you in advance.

Accepted Answer

Walter Roberson
Walter Roberson on 13 Aug 2020
You cannot solve that. Text files do not have hyperlinks, they just have text.
If you write the whole thing in HTML standards then a browser might be willing to provide link services. If you write the whole thing using RTF then an editor might be willing to provide link services.
Plain text files do not have links or colors or fonts.
  1 Comment
Andre Pereira
Andre Pereira on 13 Aug 2020
Thank you very much. Then I will write everything in a HTML file.

Sign in to comment.

More Answers (0)

Categories

Find more on Data Import and Export in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!