MATLAB Answers


Error in exporting values using xlswrite

Asked by Lawrence Johny on 19 Sep 2013
Latest activity Commented on by Donny Sun on 9 Aug 2017

While exporting using xlswrite, MATLAB gives the error as follows:

Warning: Could not start Excel server for export. XLSWRITE will attempt to write file in CSV format.

This is not a concern since Excel can handle CSV files. But when I checked the exported values, I note that the matrix has been exported into CSV in a scrambled format. Values exported do not correspond to the actual matrix obtained in MATLAB.

I tried exporting with csvwrite as well.

Any help is appreciated.

Thanks in advance.


Log in to comment.


4 Answers

Answer by J Smith
on 19 Sep 2013

Do you have MS Excel installed? look at this link please..

  1 Comment

I have MS Excel installed. It is on a mac environment, which is why i used csvwrite. Nevertheless, the matrix exported has data offset. I am exporting asset paths of Monte Carlo simulations. Data from one asset path is being written in another asset path in Excel.

The matrix contains only numbers.

Log in to comment.

Answer by Lawrence Johny on 19 Sep 2013

Its ok. When i export a smaller matrix there is no issue. Thanx.


Log in to comment.

Answer by Arthur
on 19 Sep 2013

As far as I know, Matlab can (still) not access Excel on a mac. xlswrite only works on a pc.

A shame, if you ask me.

You could try this:

  1 Comment

as far as I know, the issue exists on my Windows PC as well.

Log in to comment.

Answer by Lilian Fierro Arcos on 9 Oct 2015

Does anyone know if this issue would be fixed at some point?

  1 Comment

I would also like to know when this is fixed for Mac OS X. I guess I'll use copy and paste from the csv for now.

Log in to comment.

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!