Is it possible to run Excel calculations in Matlab?

조회 수: 4 (최근 30일)
Ibro Tutic
Ibro Tutic 2016년 12월 7일
댓글: dpb 2016년 12월 7일
Basically I have an extremely involved Excel spreadsheet that calculates stress/strain on different materials. There are various inputs in the Excel spreadsheet and then it calculates data points corresponding to stress/strain. Is there a way to:
  1. Use Matlab to create the inputs for the Excel spreadsheet
  2. Open the Excel spreadsheet, copy inputs from Matlab into relevant fields and 'run' the calculation done in the spreadsheet
  3. Extract stress/strain data to plot in Matlab.
The spreadsheet itself has a worksheet with the data values that I am interested in plotting in Matlab, but I need to be able to define input parameters in Matlab and plot the curves in Matlab, not in Excel.
  댓글 수: 3
Ibro Tutic
Ibro Tutic 2016년 12월 7일
편집: Ibro Tutic 2016년 12월 7일
It's mainly due to the complexity of the spreadsheet. There are probably 100s of if statements, each referencing a different cell on different sheets. I would have to look through the entire spreadsheet, figure out which equation references what data, what the equation is specifically, dig through VBA, write the computations in Matlab, etc. For what I am trying to do, I just need to be able to input the values into Matlab, have Matlab stick it in Excel, and have Excel run the calculation and then I take the data from a worksheet in the Excel doc.
Everything is already coded in the spreadsheet, so redoing in Matlab isn't a good use of time if I don't need to.
dpb
dpb 2016년 12월 7일
Well, start with
doc xlsread
doc xlswrite
Then, of course, there's the ActiveX server that let's you interact directly at low-level.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Use COM Objects in MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by