Eshwer
Eshwer

Reputation: 153

How to call a excel macro from .net Web service?

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 in the IIS.

Can anyone tell me how can we call a macro in c#.net web service.

Thanxs in Advance.

Upvotes: 0

Views: 828

Answers (1)

Sergio
Sergio

Reputation: 8259

The error you are getting might be from:

  1. Excel not installed on server
  2. 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

Upvotes: 1

Related Questions