Reading value from Excel file in App Designer

5 ビュー (過去 30 日間)
Muhammad Nabil Mohd Pauzi
Muhammad Nabil Mohd Pauzi 2022 年 4 月 24 日
回答済み: Kevin Holly 2022 年 4 月 25 日
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.

回答 (1 件)

Kevin Holly
Kevin Holly 2022 年 4 月 25 日
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');

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

タグ

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by