Hi Huda,
As per my understanding, you want to read an Excel file in MATLAB GUI code.
To achieve this, you can follow these steps:
- Use the "uigetfile" function to allow the user to select the Excel file.
- Use the "readtable" function to read the data from the Excel file.
Please refer to the below sample code snippet that demonstrates how to read data from an Excel file:
[filename, filepath] = uigetfile('*.xlsx', 'Select the Excel file');
if isequal(filename, 0) || isequal(filepath, 0)
disp('File selection canceled');
data = readtable(fullfile(filepath, filename));
Please refer to the following MathWorks documentation to know more about:
I hope this resolves your query.
Best Regards,
Lokesh