If not with a xlsx file
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hi, I have a IF with a not equal for my xlsx file, right now im using a empty string and works perfect, but I want to change that empty string to something like "*xlsx".
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1138385/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1138390/image.png)
0 Commenti
Risposta accettata
Rik
il 28 Set 2022
Modificato: Rik
il 28 Set 2022
You should have used isempty in your current code:
if ~isempty(app.filename)
For the test you now want to do, you should extract the extension with the fileparts function and use strcmp:
[~,~,ext]=fileparts(app.filename);
if strcmp(ext,'.xlsx')
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Develop Apps Using App Designer in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!