problem to run excel marco with out ms office excel installation on wenserver

Yu, Hai (CTDB1D) 0 Reputation points
2026-10-09T07:43:11.12+00:00

Hello,

we are searching one solution for our business case:

Server: window webserver

Service: Webservice in IIS

Function: we want to write one function to 1. open excel, 2. call excel marco, 3. save the result in the runtime.

problem: we find few documents, for example: with Microsoft.Office.Interop.Excel.dll, it is possible, but we have to install the excel on the server, which we do not want, because our webserver is hosted on AWS EC2. There are Openxml SDK, but it is not possible to run excel marco.

Question: is there any possibilty to run excel marco without office installation on server?

thank you in advance and

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments

2 answers

Sort by: Oldest
  1. AI answer

    2026-10-09T07:43:27.98+00:00

    No. Running Excel macros without Excel installed is not supported by the provided Microsoft technologies in this scenario.

    For an IIS/web server solution, Microsoft does not recommend or support server-side automation of Office applications. Office is designed for interactive desktop use, not unattended server-side code such as web services. Common failures in this model include:

    • 0x80070005 access denied
    • 0x80080005 server execution failed
    • 429 ActiveX component cannot create object
    • hangs, dialog boxes, crashes, and orphaned Excel processes

    This is especially risky when uploaded workbooks contain macros. Office server-side use does not adequately address server-side security concerns, and macros can run with high privileges depending on the server context.

    Open XML and similar file-based approaches can help read or modify workbook data, but they are not a supported way to execute VBA macros.

    The supported direction is to redesign the solution so the processing logic does not depend on running Excel/VBA on the web server. Microsoft recommends finding alternatives to Office automation for server-side solutions.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

  2. Nam-D 4,170 Reputation points Microsoft External Staff Moderator
    2026-10-09T08:57:02.6766667+00:00

    Hello @Yu, Hai (CTDB1D)

    Regarding your concern, running Excel macros requires the Excel application itself because VBA macros are executed by the Excel runtime engine. Technologies such as Open XML SDK can read and modify Excel file contents, but they cannot execute VBA macros.

    In this scenario, there is no supported Microsoft solution to run Excel VBA macros on a server without an Office installation. Additionally, Microsoft does not recommend or support automating Office applications (including Excel via Microsoft.Office.Interop.Excel.dll) from unattended server-side environments such as IIS web services, Windows services, or web applications.

    Therefore, if the business requirement specifically requires executing existing VBA macros, an Excel installation is necessary, and there is no supported method to run them purely through Open XML SDK or similar libraries without Office being installed.

    Please feel free to let me know if you have any further questions.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.