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

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! 

Answers (1)

xlswrite() ?
If ABAQUS is not saving the file, then what mechanism are you using to read it in MATLAB ?

5 Comments

Xh Du
Xh Du on 20 Jul 2015
Edited: Xh Du on 20 Jul 2015
Hello Walter,
Yes ABAQUS is not saving the file, it generate this file: Book1, and wait for me to save it. However I need to automatic loop this, thus either I use some MATLAB command to save this file, or I don't save it , and read the temporary file generated by Excel.
Walter,
xlswrite is to write MATLAB data in an Excel file, what I want is a command in MATLAB to save an unsaved Excel file.
I do not know anything about controlling ABAQUS. I searched for information about ActiveX with ABAQUS but nothing obvious came up. The discussion at https://groups.yahoo.com/neo/groups/Abaqus/info is suggest as a place that has had discussions about combining ABAQUS and MATLAB.
You might need to resort to using a Java Robot class. Or perhaps there is a different command you could use within ABAQUS that you could find in a discussion area about ABAQUS.
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!
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

Sign in to comment.

Asked:

on 20 Jul 2015

Commented:

on 20 Jul 2015

Community Treasure Hunt

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

Start Hunting!