Use of the Excel Interop in a .Net program

I have a .Net Windows forms program written many years ago, and I don't remember under which version of Visual Studio.  That program references the Excel interop.  My customer has it installed on a network drive.  To my surprise, the installation folder does not have the interop DLL.  I would have thought that years ago when I delivered the program I would have put that there.

Anyhow, they are moving to Win10 machines, still running this with a shortcut to a network drive.  One Win10 machine doesn't work, saying the DLL is not registered, while other Win10 machines work just fine.

I don't know what I'm looking for to try to resolve this.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Fernando SotoRetiredCommented:
Hi g_johnson;

On the Windows 10 machine that it does not work on do you have a copy of Excel having the same version as on the machines that it does work on installed? Not having Excel installed will cause this issue.
g_johnsonAuthor Commented:
Hi Fernando,

Yes, they have the same version of Office on all machines, though I will confirm that they did indeed install the Excel module when they installed office.

I'm wondering if I should recompile the program with the latest Interop DLL and then redeploy.  Do you think that could help?  Also, in theory, is the Interop DLL supposed to be in the program folder?
Fernando SotoRetiredCommented:
To your statement, "I'm wondering if I should recompile the program with the latest Interop DLL and then redeploy.", the interop dll version must match the version for the Excel it was written for.

To your statement, "is the Interop DLL supposed to be in the program folder?", no it will look in the Global Assembly Cache, GAC, on the machine the program that uses it is run on.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Kyle AbrahamsSenior .Net DeveloperCommented:
Just a note to check the version of office installed vs the compiled dll.  I've run into problems where you have a 32 bit DLL and a 64 bit version of office or vice versa.
Fernando SotoRetiredCommented:
@g_johnson, as @Kyle stated that will also cause problems because if you built a 32 bit app and the Excel API is 64 bit the app will need the 32 bit dll to work and vice versa.
g_johnsonAuthor Commented:
We have not resolved this and have no idea what is wrong.  However, your comments were very helpful in eliminating possible sources of conflict.  Thank you.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.