Reputation: 2573
Is there any way to run Excel macro from C# .Net without installing Excel?
Currently I am running a macro using Excel Microsoft.Office.Interop.Excel which requires Excel to be installed on the server machine. There are some libraries such as NPOI which can be used for reading or writing Excel but not sure whether it is possible to run the macro using such libraries without installing Excel.
Upvotes: 3
Views: 3192
Reputation: 57753
You cannot run a macro/VBA directly without installing Excel.
But there are some .NET libraries that can read Excel files (as you already found out). But you will need to convert/translate your macro/VBA code into a C#.NET code that uses the library.
Upvotes: 3