Cannot start desktop MATLAB COM server when MATLAB is registered using comserver function

1 view (last 30 days)
In MATLAB R2020a, why am I unable to start MATLAB COM server in desktop mode via actxserver or Excel Spreadsheet Link.
Running the command:
>> actxserver('matlab.desktop.application');
results in MATLAB opening in a non-desktop mode with the following warning message:
Warning: Unrecognized command line option: Desktop
In Excel, clicking the Spreadsheet Link dropdown (MATLAB icon), and launching MATLAB yields the same result.
How can I open MATLAB R2020a as a COM Server in desktop mode?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 14 Oct 2020
You are seeing this issue as a result of a bug in R2020a (updates 3 and earlier) with the "comserver" command. You can find the external bug report along which includes the workaround here:
As mentioned in the bug report, you can either upgrade to MATLAB R2020a Update 4 (or later) which has the fix for this issue, or you can try the following workaround:
In a R2020a MATLAB with admin rights: 
%clear registry entries
comserver('unregister','User','all')
comserver('unregister');
%register MATLAB
regmatlabserver
Please note that these commands require administrative permissions.
If you do not have administrative permissions, I would recommend reaching out to your IT department so that they can provide the necessary permissions, or try the other option of upgrading to MATLAB R2020a update 4 or later.

More Answers (0)

Categories

Find more on Data Export to MATLAB in Help Center and File Exchange

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!