Manipulate Excel from Matlab

조회 수: 4 (최근 30일)
Virginia
Virginia 2013년 6월 23일
Hi, I want to know how can develope a code so it open phisically an Excel file, and then save the selected cell range that I'll selected with the mouse as a matrix in Matlab

채택된 답변

Tom
Tom 2013년 6월 23일
The -1 field allows you to use Excel interactively.
[num txt raw] = xlsread(fileName,-1);
  댓글 수: 3
Tom
Tom 2013년 6월 23일
I think you're looking at the raw data, rather than the numeric data (see the three outputs you get from XLSREAD)?
Otherwise, try:
cell2mat(data)
Virginia
Virginia 2013년 6월 23일
I just did it, I just had to set the name of the variable for example
[K] = xlsread(comp,-1)
And that will save the range cell in matlab.
Thanks Tom!

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

추가 답변 (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