Effacer les filtres
Effacer les filtres

Open excel file that user defined the address of the file

1 vue (au cours des 30 derniers jours)
Samer Husam
Samer Husam le 20 Juin 2012
hi all; how can I open excel file that user can set the path of it.. lets say I have and edit text for user to paste the address of wanted file. I didn't like this but its not working:
Open_Excel=str2double(get(handles.edit_Load,'string'));
T=xlsread(Mulit_Excel,'Sheet1',A1);
any suggestions please on how to do it please ???

Réponse acceptée

Walter Roberson
Walter Roberson le 20 Juin 2012
Open_Excel = get(handles.edit_Load,'string');
T = xlsread(Open_Excel,'Sheet1','A1');
Consider using uigetfile() instead of an edit handle
[filename, filepath] = uigetfile(...)
Open_Excel = fullfile(filepath, filename);
T = xlsread(Open_Excel, 'Sheet1', 'A1');

Plus de réponses (0)

Catégories

En savoir plus sur Data Import from MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by