필터 지우기
필터 지우기

Get selected range in Excel file using MATLAB

조회 수: 9 (최근 30일)
Christophe
Christophe 2011년 9월 9일
Hello,
I have seen a MATLAB GUI program that is able to open the Excel file and get the range of the cells that the user have selected. This value is returned to MATLAB.
I have no idea how it is possible since the Excel file is normal without any macro. Additionally, when MATLAB opens an Excel file, it does not run anymore so how possible can we obtain anything from Excel ?
Thank you very much in advance.

채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 9월 9일
The function is probably uiimport. Type uiimport in Command Window to start.
You can also use xlsread(). Type help xlsread to find out.
  댓글 수: 4
Fangjun Jiang
Fangjun Jiang 2011년 9월 9일
That's true. You could open the .xls file outside of MATLAB, select the data and copy it (press Ctrl+C), then at the first dialog of uiimport, Select "Clipboard" instead of "File". I just did it and it works.
Christophe
Christophe 2011년 9월 9일
Thank you very much. It works too but I think the xlsread method is more natural for users.
Anyway I did not know the existence of uiimport, it may help me in the future.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by