msopen : Opens Microsoft Office files (Word, Excel, Power Point, Project, & Access).
file: Name of file with extension (ex. 'Doc1.doc')
msopen myfile.ppt myfile.xls myfile.doc;
msopen *.xls *.doc;
Is this command similar to officedoc and winopen.m?
dos('filename') is easier, except if you have spaces in your filename.
Indeed winopen seems to do the same.
msopen has following extended features:
- can open several files in a row
- allows wildcard in filespec
- allows partial path
which make it anyway very useful.
I would have following improvements (that's why only a 4 rating):
- it would be nice if you could take as input a list (cellstr) of files and not only the command window syntax.
- there is a small bug if no file was found. (you should check if output of wildfiles==0 to exit properly)
I am using this file because I want to be able to open also txt files with Excel. I've modified the file
so it handles this.
This can winopen definitely not do as well!
Thanks, good to do the simple task of opening those files
i have a problem with this file. i used to open a xls file that must run the "MATLAB EXCEL LINK" macro, and this .m dont do that. it say me a error "the link is broken".
See also winopen.m, built into MATLAB.
Open an ms application is not that challenging. It is more important how to manage it by using matlab. Do you know some source that explain the functions and their parameters of this applications.
Now Supporting Microsoft Office 2007 extensions
Fixed a bug caused by (wildfiles) function
Now supports wildcard
Now can open Project & Access
Fixed another path bug
Fixed file path bug
Multiple file option added