- https://www.mathworks.com/help/matlab/ref/writetable.html
- https://www.mathworks.com/help/matlab/ref/readtable.html
Web App and ActiveX
5 views (last 30 days)
Show older comments
I have written a Web App which processes some information and then saves it to an Excel workbook for the user to download. I am using complex formatting in the Excel workbook which requires ActiveX. Because ActiveX is not supported with Web Apps, I compiled the MATLAB function that generates the Excel workbook using ActiveX into a separate program. The Web App will call this separate program from the command line using the system command. The Web App works correctly and the separately compiled function runs correctly when launched from the Command Prompt in Windows. However, when I deploy the Web App to the server, it gives an error in activexserver.m on line 89 "MATLAB:COM:servercreationfailed". Does the Web App limitation apply to separately compiled programs that are launched from the command line? If so, is there any way around this?
0 Comments
Answers (1)
Divyanshu
on 24 Nov 2023
Hi C.Wilson,
I understand that you are trying to work with Excel using ActiveX in deployed environment.
Unfortunately the function is not supported on Web App. Moreover, using Excel in Web Apps is not recommended as per Microsoft's considerations in their 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 is to use "readtable"/ "writetable" functions without invoking the Excel behind the scenes ('UseExcel=false').
Please refer the following documentation for better understanding:
I hope it helps!
Thank you.
See Also
Categories
Find more on Web Services 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!