Re: How to open an excel file

Patrick Steele <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.winforms
Message-ID <002301c76a58$4a641dd0$6701a8c0@raptor>
Usually on those interop assemblies, the "leading underscore" name
represents the default COM interface.  That actuall class to instantiate
is the name with "Class" appended on to it:

_Application app = new ApplicationClass();

--
Patrick Steele
http://weblogs.asp.net/psteele



-----Original Message-----
From: Discussion forum for developers using Windows Forms to build apps
and controls [mailto:[email protected]] On Behalf Of
Steve Abaffy
Sent: Monday, March 19, 2007 2:48 PM
To: [email protected]
Subject: [DOTNET-WINFORMS] How to open an excel file


Hello,


        I have Microsoft.Office.Interop.Excel add as a Reference as well
as
Microsoft.Office.Core and I have the following line of code:

private Microsoft.Office.Interop.Excel._Application ExcelObj;
ExcelObj = new Microsoft.Office.Interop.Excel._Application();

And I get the error
Cannot create an instance of the abstract class or interface
Microsoft.Office.Interop.Excel._Application

What am I doing wrong???
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.