View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Doug Price Doug Price is offline
external usenet poster
 
Posts: 1
Default Immediate Fail: Launch Excel via Interop

Ok, I've been all over the net for the last couple of days, and I can't see
why this is failing. The following (very simple) C# Windows Forms App:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Excel = Microsoft.Office.Interop.Excel;

namespace Junk
{
public partial class Form1 : Form
{
private Excel.Application xlApp;
public Form1()
{
InitializeComponent();
xlApp = new Excel.ApplicationClass();

}
}
}

Fails with the following message when we attempt to instantiate the
Excel.ApplicationClass():

Retrieving the COM class factory for component with CLSID
{00024500-0000-0000-C000-000000000046} failed due to the following error:
80080005.

Microsoft.Office.Core and Microsoft.Office.Interop.Excel are set up in the
references for this project. The target is an local installation of Excel
2007. The version of the interface is Office 12. This is on Windows Vista
Business with Visual Studio 2008.

Most of the discussion on the net revolves around DCOM permission issues for
this error message. But, this doesn't appear to be the problem. For one
point, all users are allow to local-launch Excel, according to DCOMCNFG. I
transported the executables to a Windows XP virtual image, and the same
problem occurs, causing me to discount Vista permissions as the issue.

Any suggestions? I've run out of ideas here....

thanks,
Doug Price