MATLAB Answers

MattyK
0

Good day. I seem to get the below mentioned xlmwrite error message. Does this suggest my Excel is not compatible? I am using Matlab 2015a. Thanks

Asked by MattyK
on 20 Apr 2016
Latest activity Edited by Meade
on 5 May 2016
Warning: Could not start Excel server for export. XLSWRITE will attempt to write file in CSV format. > In xlswrite (line 174)

  7 Comments

Try this just to see if you can open Excel through Matlab. (This is the method xlswrite uses internally.
try
Excel = actxserver('Excel.Application');
set(Excel,'Visible',1);
fprintf('Your Excel is fine\n')
pause(1)
Excel.Quit % Call before clearing "Excel"; otherwise, COM connection will stay open
Excel.delete
catch ME
fprintf('Your Excel failed to open\n')
rethrow(ME)
end
Thanks very much for the help. However, i am getting this below error. >> Excel = actxserver('Excel.Application') Undefined function or variable 'actxserver'.
Very strange. What about if you run this:
list = actxcontrollist;
for k = 1:2
sprintf(' Name = %s\n ProgID = %s\n File = %s\n', list{k,:})
end
Does anything say excel here? If this also fails/isempty, you may have a problem with the activex part of Windows (separate from Matlab)
If this doesn't work, you could try connecting to Excel using .NET (instead of COM). I've not used it, but it looks reasonable.

Sign in to comment.

0 Answers