how to save data in uitable permanently

1 view (last 30 days)
I want to save data present in uitable permanently so that next time when I run gui again ,the previous data must be present(or unchanged) in same gui.
I even tried by switching off the gui visibility but it didn't work out.
Please assit me in achieving the desired result.

Accepted Answer

Walter Roberson
Walter Roberson on 19 Jan 2016
If you are using GUIDE, you could savefig() on top of the existing .fig file, so that the next time the GUI is started, it would be a copy of what was saved.
I do not recommend this, but it is the only way of achieving "the previous data must be present(or unchanged) in same gui"
What I would recommend is that you get() the Data property of the uitable and save() it in a convenient file, and that in your Open callback for that uitable you check whether such a file exists and if it does find it then loads it into Data property of the uitable. The user will see the data because it will have been loaded to the table before the table becomes visible. The user experience is the same as what you asked, but this is not the same as the data already being present in the table when the GUI is started.

More Answers (0)

Categories

Find more on Migrate GUIDE Apps 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!