Question Missing namespace

seabass341

New member
Joined
Aug 11, 2010
Messages
2
Programming Experience
3-5
I'm trying to make an vb.net project which generates data and then exports it to an excel spreadsheet complete with a chart representing the data.

I have Office 12 (Including Excel 2007) as well as windows SDK.

All the tutorials I've seen which explain how to create/modify an excel spreadsheet say I need to import Microsoft.Office.Interop.Excel. However, for some reason this namespace doesn't exist. Microsoft.Office.Interop.Access and Microsoft.Office.Interop.OutlookViewCtl are both importable, however. I can't find any reference under the "add Reference..." dialog which includes excel. Does anyone know where the reference I need might be or any other way to allow me to import the namespace?

An example of a tutorial I would use is here
 

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,603
Location
Norway
Programming Experience
10+
You do have to reference the libary before you can use it (importing namespace is a way of using it). As article explains it is in COM tab of references named "Microsoft Excel x Object Library". If it isn't you haven't installed .Net support with Excel, which sets up the Interop libraries for .Net use, this is included in default Office 2007 installation.
 

seabass341

New member
Joined
Aug 11, 2010
Messages
2
Programming Experience
3-5
I was trying a bunch of things and I'm not sure what worked, but now I see the proper reference and I got it all to work. Sorry I had to bother everyone with my incompetence
 
Top Bottom