Select a file from a dropdown

7 次查看(过去 30 天)
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
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
Hi,
You can use a combination of dir and uidropdown.
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 个)

类别

Help CenterFile Exchange 中查找有关 File Operations 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by