App Designer: Display content of a txt file on a text area

62 views (last 30 days)
Alessandro Togni
Alessandro Togni on 15 Feb 2021
Answered: Mario Malic on 15 Feb 2021
the GUI i'm currently working on read a 2-columns file from txt and i want to show those values (numeric) on a text area mantining the columns separated.
Any suggestion will be very appreciated,
thank you.

Answers (1)

Mario Malic
Mario Malic on 15 Feb 2021
Try this and see if the output is correct.
app.TextString = fileread('file.txt');
app.TextArea.Value = app.TextString;

Community Treasure Hunt

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

Start Hunting!