Problems with actxserver function for xlswrite?
4 次查看(过去 30 天)
显示 更早的评论
I have error: Undefined function 'actxserver' for input arguments of type 'char'. I use iMac (late 2009) and OSX 10.9.4. Matlab is 2014a (student) and I try write Excel-files using xlswrite. So, how I can write to Excel-files?
0 个评论
回答(2 个)
Iain
2014-8-11
I am guessing that since you're using an iMac, that you don't have windows installed, and that may explain why you do not have the option of using an activex server.
Do you have excel on that machine? If so, you might be able to use DDE methods (ddepoke, ddeinit, ddeexec) to send commands (and data) to an open excel application. You may need to understand VBA to do it though.
Another answer to your question is to use CSV files.
fopen, fwrite/fprintf and fclose will be what you need to use to do that, e.g.
fid = fopen('blah.csv','w');
fwrite(fid,uint8(['Hello, duckies, are you feeling well?' 10 13 '45, 23, 76, 235, 12345' 10 13]),'uint8');
fwrite(fid,uint8(['Goodbye, No I am dead., I told you i was sick.' 10 13 '454, 234, 476, 45, 1235']),'uint8');
fclose(fid);
3 个评论
Image Analyst
2014-8-11
Use the 'dir' option in your call to exist().
Use csvwrite() or dlmwrite() instead of xlswrite().
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!