MATLAB Answers

Error while using xlswrite

2 views (last 30 days)
Suchetana Gupta
Suchetana Gupta on 24 Jun 2015
Commented: Suchetana Gupta on 27 Jun 2015
I am running Matlab 2014b in my Ubuntu 14.04 desktop. I have an xlswrite command in my piece of code. On running it, I get the message that cannot connect to excel server, attempting to write in csv format. However, even a csv format file doesn't come up. The expected file has ~45000 rows and 6 columns. The same piece of code works quite fine, without any error and gives the desired output in a Windows machine. Earlier codes having xlswrite have worked on my Ubuntu machine with the same error/warning message too and in those cases I actually got a csv file. Can someone please suggest me a solution? Thanks

Answers (1)

Stephen Cobeldick
Stephen Cobeldick on 24 Jun 2015
Edited: Stephen Cobeldick on 24 Jun 2015
For more robust and portable code you should use csvwrite or dlmwrite instead.
xlswrite is dependent on Excel for Windows® and its COM server (part of the typical installation of Excel), and so its behavior is really quite system dependent. This is described in the documentation.
  3 Comments
Suchetana Gupta
Suchetana Gupta on 27 Jun 2015
Well, I solved my problem by using xlwrite function from Matlab Central.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by