Select a file from a dropdown

조회 수: 10 (최근 30일)
Daniel
Daniel 2022년 10월 7일
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
Dhanesh Alagarsamy Chinnaraja 2022년 10월 13일
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