I am trying to call a excel macro from the my web service but it is unable to initialize the Excel.Application object. This is giving error at following line:
Microsoft.Office.Interop.Excel.Application oExcel = new Microsoft.Office.Interop.Excel.Application();
Even for publish the web service i am using the service account in the Application pool开发者_StackOverflow in the IIS.
Can anyone tell me how can we call a macro in c#.net web service.
Thanxs in Advance.
The error you are getting might be from:
- Excel not installed on server
- The user executing your IIS application pool doesn't have enough privileges to run excel.
After coping with that, you can check how to run a macro here
精彩评论