MATLAB Answers


URGENT....!!!! Error Using xlswrite R2012a Ubuntu 12.04

Asked by Priya
on 22 May 2013
This question is closed and may reopen in the future if edited.

I have been using xlswrite function since years in R2011a Matlab version in windows.

Now my work has shifted to ubuntu 12.04 and I downloaded latest MAtlab version R2012a.

xlswrite function is not working. It shows following error:

"" Error using xlswrite (line 188) An error occurred on data export in CSV format.

Caused by:

Error using dlmwrite (line 118) The input cell array cannot be converted to a matrix. ""

I don't know why the error is showing csv or dlmwrite related errors while I am working with excel sheets.


No products are associated with this question.

1 Answer

Answer by Friedrich
on 22 May 2013
Edited by Friedrich
on 22 May 2013


the doc for xlswrite cleary states:

If your system does not have Excel for Windows, or if the COM server (part of the typical installation of Excel) is unavailable, then the xlswrite function:
Writes array A to a text file in comma-separated value (CSV) format.

Since you are using Linux you don't have Excel => MATLAB tries writing a CSV file using the dlmread command, which fails because the cell data you try to write cant be converted into a matrix.

  1 Comment

on 22 May 2013

Is there no alternative command for linux. It will be difficult to switch to windows just for MATLAB, as all my work goes on in linux.

Discover MakerZone

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

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!