Supporting Excel 2002 and Excel 2003 from .NET application

J

John Mercure

I have a need to support Excel 2002 and Excel 2003 from the same version of a
..NET application. I am using C# for the development.

The code runs fine from the VS .NET environment with an Excel reference for
Excel 2002. I originally wrote the code with a reference to Excel 2003 and
subsequently downgraded to 2002 without issue in the development enviroment.

The current Excel reference within the .NET application is for Excel 2002.
When the application is installed on a PC that is running Excel 2003, the
following error is reported:

"File or assembly name Microsoft.Office.Interop.Excel, or one of its
dependencies was not found"

How do I support both Excel 2002 and Excel 2003 from the same application?
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?Sm9obiBNZXJjdXJl?=,

this is just a guess, but since you haven't gotten a reply before now...

My guess is that your problem may have something to do with the (lack of) Office
2002 PIAs on the target machine. Are you certain you've distributed and
correctly installed the Excel 2002 PIAs?
I have a need to support Excel 2002 and Excel 2003 from the same version of a
..NET application. I am using C# for the development.

The code runs fine from the VS .NET environment with an Excel reference for
Excel 2002. I originally wrote the code with a reference to Excel 2003 and
subsequently downgraded to 2002 without issue in the development enviroment.

The current Excel reference within the .NET application is for Excel 2002.
When the application is installed on a PC that is running Excel 2003, the
following error is reported:

"File or assembly name Microsoft.Office.Interop.Excel, or one of its
dependencies was not found"

How do I support both Excel 2002 and Excel 2003 from the same application?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
J

John Mercure

Actually, the Excel 2002 PIA won't install on a machine that has Excel 2003
on the same machine. At least they won't install for me.

From a development point of view, I can't add the Excel 2002 and Excel 2003
three references in the project at the same time.
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?Sm9obiBNZXJjdXJl?=,
Actually, the Excel 2002 PIA won't install on a machine that has Excel 2003
on the same machine. At least they won't install for me.
You shouldn't be trying to INSTALL the PIAs into the GAC. Your PIAs should be
going into the project folder, and your project needs to reference them there
(actually, it should first check the local folder and, if it doesn't find PIAs
there, then it will go to the GAC).
From a development point of view, I can't add the Excel 2002 and Excel 2003
three references in the project at the same time.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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