Microsoft.Office.Interop.Excel doesn't like me

  • Thread starter C# newbie with big problems
  • Start date
C

C# newbie with big problems

Ok, I've tried everything I could come up with but nothing is working.
I am creating an application which needs to post information into an
excel document. I have not yet had a chance to play with any of the
methods because I cannot pull in the Microsoft.Office.Interop.Excel
class. I am using Visual c# 2005 Express as my IDE, and here what I
have done so far.

I open a new project and select Project->Add Reference

Then I go to the <b>COM</b> Tab and select <b>Microsoft Excel 11.0
Object Library</b>

So from here I should be able to import
<b>Microsoft.Office.Interop.Excel</b>

Problem is, that when I type in <b>using Microsoft.Office.</b> I do not
get the option to choose Interop... just core. I have searched the web,
reinstalled my copy of Express, and still nothing is working. I have
decided to hold my company laptop for ransom of information. If I
cannot solve this problem my laptop will end up being destroyed... muah
ha ha
 
A

Alvin Bruney

If I understand you correctly, it may just be intellisense failing. Go ahead
and add the namespace and see if it compiles. The object 11 library should
make available the Excel objects.

--

________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
 
C

C# newbie with big problems

No, I tried that. It will not compile at all. It spits out the error

Error 1 The type or namespace name 'Interop' does not exist in the
namespace 'Microsoft.Office' (are you missing an assembly reference?)

The thing about it is, that it works fine on my coworkers box its only
mine that has a problem with it. The Excel and everything else is up to
date and I am truely out of idea's any help would be greatly
appreciated... (even if there is another way to recieve
interopperability with Excel and C#) The only thing I have to do is
fill an existing table with values

--Roman
 
C

C# newbie with big problems

This post is to let you know what a manly Visual Studio guru you really
are. Although, It was shot once with a deadly nerf dart launcher, due
to your help, my company laptop will recover and survive.Thank you for
your help... I am off to learn about configuring Excel to work with C#

--Roman
 
R

rwiegel

I am having the same trouble with Microsoft.Office.Interop.Word. I
installed the PIA and still no luck...Any suggestions?

-Ryan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top