An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
Hi @Alain PAPET ,
Yes, this is a known limitation with server-side Office automation. Microsoft does not recommend or support automating Office applications from unattended/server-side code such as ASP, ASP.NET, DCOM, or Windows services.
Reference: Considerations for server-side Automation of Office
The document explains that Office applications are designed for interactive desktop use and may become unstable or deadlock when used in a server-side environment. It also highlights the security risk of opening uploaded files and running macros on the server, especially because macros could run with high privileges depending on the server context.
Because of that, I would generally avoid a design where customer-uploaded .xlsm files are opened and their VBA macros are executed on the server. Open XML/EPPlus can help with reading or modifying workbook data, but they are not a supported replacement for running VBA macros.
A safer approach would be to move the processing logic outside Excel, or redesign the flow so macro execution happens client-side or in a controlled/isolated environment.
Hope this helps. If you found my response helpful or informative, I would greatly appreciate it if you could follow this guidance or provide feedback.
Thank you.