Select a file from a dropdown

10 visualizaciones (últimos 30 días)
Daniel
Daniel el 7 de Oct. de 2022
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 comentario
dpb
dpb el 7 de Oct. de 2022
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...

Iniciar sesión para comentar.

Respuesta aceptada

Dhanesh Alagarsamy Chinnaraja
Dhanesh Alagarsamy Chinnaraja el 13 de Oct. de 2022
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'

Más respuestas (0)

Categorías

Más información sobre File Operations en Help Center y File Exchange.

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by