- Make sure that you have Office runtime installed on the server.
- If you are using Windows Server 2008 then using office interops is a lenghty configuration and here are the steps.
Better is to move to Open XML or you can configure as below
- Install MS Office Pro Latest (I used 2010 Pro)
- Create User ExcelUser. Assign WordUser with Admin Group
- Go to Computer -> Manage
- Add User with below options
- User Options Password Never Expires
- Password Cannot Be Change
Com+ Configuration
- Go to Control Panel – > Administrator -> Component Services -> DCOM Config
- Open Microsoft Word 97 – 2003 Properties
- General -> Authentication Level : None
- Security -> Customize all 3 permissions to allow everyone
- Identity -> This User -> Use ExcelUser /password
- Launch the Excel App to make sure everything is fine
3.Change the security settings of Microsoft Excel Application in DCOM Config.
Controlpanel –> Administrative tools–>Component Services –>computers –> myComputer –>DCOM Config –> Microsoft Excel Application.
Right click to get properties dialog. Go to Security tab and customize permissions
See the posts here: Error while creating Excel object , Excel manipulations in WCF using COM