how to read a excel file by taking user input in dialog box

조회 수: 1 (최근 30일)
Ravikant Singh
Ravikant Singh 2014년 3월 7일
답변: Image Analyst 2014년 3월 8일
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
Chandrasekhar
Chandrasekhar 2014년 3월 7일
you can take it as an input , Also you can use activex server commands to display all the sheets existing in that xls

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2014년 3월 8일
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.

카테고리

Help CenterFile Exchange에서 ActiveX에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by