Select a file from a dropdown
10 次查看(过去 30 天)
显示 更早的评论
Daniel
2022-10-7
回答: Dhanesh Alagarsamy Chinnaraja
2022-10-13
Hi,
Right now my app when starts with the startupfnc I select a specific dir with uigetdir, so now I want to have all the ".xlsx" files of the dir in a dropdown.
Thanks for your help.
1 个评论
dpb
2022-10-7
See uigetfile instead (don't make your user go through two dialogs when can select the directory in the latter as well). Hopefully you can have a reasonable guess at where should be for a default starting location...
采纳的回答
Dhanesh Alagarsamy Chinnaraja
2022-10-13
Hi,
dir('*.xlsx');
will return all files with '.xlsx' extension in the present directory.
The appropriate elements from the structure returned by 'dir' can be used as inputs for 'uidropdown'
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 File Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!