Reading value from Excel file in App Designer

24 vues (au cours des 30 derniers jours)
Muhammad Nabil Mohd Pauzi
Muhammad Nabil Mohd Pauzi le 24 Avr 2022
I am trying to read the value in a specific cell (say, A2) in an Excel file and use this value as the input of a numeric field in app designer. Can I know how I can do this? Cheers.

Réponses (1)

Kevin Holly
Kevin Holly le 25 Avr 2022
Please see the app attached. I used uigetfile to select the file and then xlsread to extract the value of interest from the Excel file. I would use readcell in the latest releases of MATLAB.
[filename, folder] = uigetfile('*.xls*');
app.EditField.Value = xlsread(fullfile(folder,filename),1,'A2');

Catégories

En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by