Why does using ActiveX in MATLAB Web App Server fail with "Server Creation Failed : Access denied" errors?
11 views (last 30 days)
Show older comments
MathWorks Support Team
on 4 Dec 2024 at 0:00
Edited: MathWorks Support Team
on 4 Dec 2024 at 14:43
I am working with a deployed web app, in which I am trying to use the ActiveX interface. I am working with ActiveX because I create both tables and Excel figures as part of an Excel report.
The errors I run into are the following:
Error using feval
Server Creation Failed : Access denied
Error in actxserver (line 89)
The offending line in their code is:
Excel = actxserver('Excel.Application');
Everything works fine in a non-deployed environment.
Accepted Answer
MathWorks Support Team
on 4 Dec 2024 at 0:00
Using Excel in Web Apps is not recommended as per Microsoft's help page:
"Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment."
The recommended approach
The recommended approach is to use "readtable" / "writetable" without invoking Excel behind the scenes ('UseExcel=false'), and reimplement figures as MATLAB "UIAxes" controls in AppDesigner.
Running report generator reports using "
rptview()
" will not work in web apps, since it will open another window.
You may be able to use MATLAB report generator in web apps, but offer to download generated report via web link to users. If report viewing inside web app is desired, it is possible to use R2019b HTML control to load HTML report generated by MATLAB.
0 Comments
More Answers (0)
See Also
Categories
Find more on ActiveX in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!