필터 지우기
필터 지우기

Data from MATLAB to excel then back

조회 수: 4 (최근 30일)
Collin Poesch
Collin Poesch 2018년 6월 8일
댓글: Collin Poesch 2018년 6월 8일
I have a program where I output data to excel from MATLAB, then MATLAB performs calculations on that data and sends it back to excel, and then excel performs calculations(the final data). I want to get the final data from excel into MATLAB, but if I try to use readtable, the calculations are not performed even though I put readtable after MATLAB sends the data to excel. The final data only shows when I open excel. How could I go about doing this?
  댓글 수: 2
Brandon Free
Brandon Free 2018년 6월 8일
You might have to provide more detail with example code
Collin Poesch
Collin Poesch 2018년 6월 8일
편집: Collin Poesch 2018년 6월 8일
Sure. I have to close excel in order for readtable to work.
% code
xlswrite('read.xlsx',twothirdspoint(:,:),'calculations','P17:Q26');
The data is now in excel.
I have the data set up so user defined functions are performed on it in excel.
% code
newfortwothirds= readtable('read.xlsx','Sheet','calculations','Range','J24:J104');
I then try to retrieve the data that should be calculated but it just returns empty cells.

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

채택된 답변

Walter Roberson
Walter Roberson 2018년 6월 8일
Your calculations inside Excel are Excel macros, and macros are not triggered at the time data is written.
  댓글 수: 1
Collin Poesch
Collin Poesch 2018년 6월 8일
I did something similiar; I just opened the excel workbook then let excel calculate then I extracted the data back to matlab.

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by