MATLAB Answers

How can i save the text area characters to a text file in app designer?

23 views (last 30 days)
I need to save notes in the text area to a specific location. How to save the data using app designer?

  0 Comments

Sign in to comment.

Accepted Answer

Siriniharika Katukam
Siriniharika Katukam on 18 Feb 2020
Hi
To load text entered in text area of an app to a text file, you can do this in the callback function of text area.
value = app.TextArea.Value; % Value entered in textArea
f=fopen('a.txt','w');
formatSpec= "%s";
for i =1:length(value)
fprintf(f,formatSpec,value{i});
end
Hope this helps!

More Answers (1)

kuldeep vaishnav
kuldeep vaishnav on 24 May 2020
value = app.TextArea.Value; % Value entered in textArea
f=fopen('a.txt','w');
formatSpec= "%s";
for i =1:length(value)
fprintf(f,formatSpec,value{i});
end

  0 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!