Error using xlswrite (line 219) in Matlab

眉间皱痕 提交于 2019-12-13 09:03:00

问题


while I run the following code, an example in matlab:

filename = 'testdata.xlsx';
A = [12.7 5.02 -98 63.9 0 -.2 56];
xlswrite(filename,A)

I get the error

Error using xlswrite (line 219)

I have already tried to slove this problem. I reinstall office, and reinstall matlab, but i doesn't work. However, the above code is valid in other PC.


回答1:


Try using csvwrite instead of xlswrite. Both can be read by excel, but csvwrite will be less buggy to office installations. If csvwrite works, then you can look further into office compatability issues.




回答2:


Just open the Windows Task Manager (Ctrl+Shift+Esc), then click on "More details", in "Processes" find and close all excel processes and then run your code.



来源:https://stackoverflow.com/questions/35699929/error-using-xlswrite-line-219-in-matlab

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!