Advertisement

06.03.2007 at 11:37AM PDT, ID: 22609902
[x]
Attachment Details

Problem referencing Office 2003 Library

Asked by axnst2 in Microsoft Visual C#.Net, Microsoft Excel Spreadsheet Software, Visual Studio .NET 2005

Tags: namespace, could, found

Hi Experts,
 
    I wrote an application in C#  that opens an Excel file, does some things, and then closes it.  I originally wrote the program to use Office XP, and it worked great.  Now my company has upgraded Office from XP to 2003, and now I can even compile my code.  I get: "The type or namespace name 'Excel' could not be found (are you missing a using directive or an assembly reference?)"  I deleted the reference to the old Excel Library, added a reference to the new one.  It still doesn't work.  Here's a little sample code of what I am trying to do:

using Excel;       //<- I get my error on this line and every line that references Excel after this.

Public Class Test
{
     Excel.Application excel;
}

Any help would be great...

Thanks,
axnst2Start Free Trial
[+][-]06.03.2007 at 12:41PM PDT, ID: 19204693

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual C#.Net, Microsoft Excel Spreadsheet Software, Visual Studio .NET 2005
Tags: namespace, could, found
Sign Up Now!
Solution Provided By: Dr-Hussain
Participating Experts: 1
Solution Grade: A
 
 
[+][-]06.21.2007 at 06:17AM PDT, ID: 19332746

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32