how to read a excel file by taking user input in dialog box
Ältere Kommentare anzeigen
program
prompt='enter file name'; dlg_title='file name'; num_lines=1; a=input(prompt,dlg_title,num_lines);
prompt='enter sheet name'; dlg_title='Sheet name'; num_lines=1; b=input(prompt,dlg_title,num_lines);
[data,header]=xlsread(a,b);
i am getting an error "Filename must be string"
6 Kommentare
ES
am 7 Mär. 2014
You could use uigetfile instead. That will save you from unkonown file, path issues etc.
Ravikant Singh
am 7 Mär. 2014
Chandrasekhar
am 7 Mär. 2014
you have to use a filter as given below
uigetfile('*.xls')
Ravikant Singh
am 7 Mär. 2014
Chandrasekhar
am 7 Mär. 2014
you can take it as an input , Also you can use activex server commands to display all the sheets existing in that xls
Ravikant Singh
am 8 Mär. 2014
Antworten (1)
Image Analyst
am 8 Mär. 2014
0 Stimmen
If you want to know how to control Excel with ActiveX, see my attached demo. You can do a lot more than is in my demo, such as getting all the sheet names, etc.
Kategorien
Mehr zu ActiveX finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!