Error in exporting values using xlswrite

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.

Respuestas (6)

ES
ES el 19 de Sept. de 2013

0 votos

Do you have MS Excel installed? look at this link please.. http://www.mathworks.in/matlabcentral/answers/21477

1 comentario

Lawrence Johny
Lawrence Johny el 19 de Sept. de 2013
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.

Iniciar sesión para comentar.

Lawrence Johny
Lawrence Johny el 19 de Sept. de 2013

0 votos

Its ok. When i export a smaller matrix there is no issue. Thanx.
Arthur
Arthur el 19 de Sept. de 2013

0 votos

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.

1 comentario

Donny Liu
Donny Liu el 9 de Ag. de 2017
as far as I know, the issue exists on my Windows PC as well.

Iniciar sesión para comentar.

Lilian Fierro Arcos
Lilian Fierro Arcos el 9 de Oct. de 2015

0 votos

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

8 comentarios

Brandon
Brandon el 29 de Dic. de 2015
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.
Douwe Horsthui
Douwe Horsthui el 31 de Oct. de 2017
Does anyone knows if this is fixed by now?
Alexa Jill
Alexa Jill el 31 de Oct. de 2017
It is not working for me on my mac either. Office with Excel is installed on the system.
Walter Roberson
Walter Roberson el 31 de Oct. de 2017
Note: Excel is never used for any input or output on Mac or Linux -- only on on MS Windows with Excel installed.
Marian Kennedy
Marian Kennedy el 26 de En. de 2018
What is your suggestion for exporting workspace matrix on a Mac?
Stephen23
Stephen23 el 26 de En. de 2018
Walter Roberson
Walter Roberson el 26 de En. de 2018
writetable() can also be useful.
Walter Roberson
Walter Roberson el 26 de En. de 2018
It is unlikely that MATLAB for Mac will ever support ActiveX to communicate with Excel. ActiveX for Mac and Linux are not common (though they are available). Microsoft's Excel for Mac does not support ActiveX.
Although it is hypothetically possible in time that ActiveX could be built in to Mac and that Microsoft could add ActiveX support, it is not likely:
  1. Microsoft has given less and less support to the Mac version of Office, as Microsoft has concentrated on Office 365, the cloud version that runs remotely
  2. There has been discussion over the last few months that Apple might be getting out of the OS-X / MacOS business, possibly abandoning iMac and MacBook lines, with iOS based iPAD Pro line taking over. https://www.digitaltrends.com/computing/will-apple-ever-kill-the-macbook/ and https://9to5mac.com/2017/01/06/2017-beyond-whats-next-for-mac-and-what-of-its-longer-term-future/ and others more explicit that I do not happen to find links for at the moment. It is thus far from clear that MacOS will last long enough for Microsoft to bother adding ActiveX to their Mac version of Office.

Iniciar sesión para comentar.

Wuqi Song
Wuqi Song el 17 de Nov. de 2020

0 votos

You can use writetable() to replace xlswrite(). It works for mac when using writetable().
Ali TARRAQ
Ali TARRAQ el 1 de Jul. de 2021

0 votos

You can also use writematrix() instead of writetable() or xlswrite(). It works better for me.

Productos

Etiquetas

Preguntada:

el 19 de Sept. de 2013

Respondida:

el 1 de Jul. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by