datcn
datcn

Reputation: 751

How to use the command xlswrite in a Mac version of MatLab?

When I use a Mac version of MatLab, I want to store a matrix into a '.xls' file. But it fails with a warnings saying that it could not start Excel server for export.

I was wondering if there is any solution to address this.

Upvotes: 2

Views: 6429

Answers (2)

Sameh K. Mohamed
Sameh K. Mohamed

Reputation: 2333

From MathWorks Solutions Support :

The ability to use XLSWRITE on a Mac system to create Excel files is not available in MATLAB 7.12 (R2011a). XLSWRITE instead creates CSV (comma-separated value) files when used on a Mac, and provides the same functionality as it does on Linux and UNIX platforms.

The full functionality of XLSWRITE depends on the ability to instantiate Microsoft Excel as a COM server. COM is a technology developed for Windows platforms and is not available for the Mac. Thus XLSWRITE as well as XLSREAD have limited functionality on the Mac platform and work in basic mode.

Support for XLSREAD on Mac OS X may be considered for a future release of MATLAB. Unfortunately, there are no workarounds for the issue at this time.

Upvotes: 0

user1132648
user1132648

Reputation:

MATLAB has been notorious for not supporting this function on Mac. Look at this blog or this entry in FileExchange

Alternately, you can use csvwrite to write a CSV file and import that to Excel. AFAIK, csvwrite is platform independent.

Upvotes: 2

Related Questions