What is the command in MATLAB to save an Excel file?

조회 수: 2 (최근 30일)
Xh Du
Xh Du 2015년 7월 20일
댓글: Walter Roberson 2015년 7월 20일
Hello,
I'd like to automate a loop:
1. ABAQUS generates a Excel file;
2. Matlab utilises data in Excel file;
3. loop 1 and 2.
Now my question is: after step 1, the Excel file from ABAQUS is unsaved as Book1. I cannot use Matlab command to save it. Is there a command to save Excel file as something? (I assume that Excel always saves the file even though user doesn't?)
Thank you! 

답변 (1개)

Walter Roberson
Walter Roberson 2015년 7월 20일
xlswrite() ?
If ABAQUS is not saving the file, then what mechanism are you using to read it in MATLAB ?
  댓글 수: 5
Xh Du
Xh Du 2015년 7월 20일
It has nothing to do with ABAQUS actually, it can be any unsaved Excel file. Assume you open Excel and put some data in sheet, do not save it, then you have an unsaved Excel file named as 'Book1' by default. So I'm asking is there a way in MATLAB to operate on this 'Book1'? either to read data in it or save it?
Thank you Walter!
Walter Roberson
Walter Roberson 2015년 7월 20일
ABAQUS generating an Excel file is not the same as Excel being active and accessible from MATLAB.
But if Excel is currently active and if you are using MS Windows, then you can use ActiveX to talk to it; see for example http://www.mathworks.com/matlabcentral/answers/94822-are-there-any-examples-that-show-how-to-use-the-activex-automation-interface-to-connect-matlab-to-ex

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

카테고리

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