We help IT Professionals succeed at work.

Compiling using Office PIAs

Last Modified: 2013-12-17
I have written a .NET application in C# that writes output to an Excel file in specific rows and columns.

I have compiled this application using Office 2003 PIAs on my development machine. My customer has Office XP on some machines, Office 2003 on some machines and Office 2007 on some other machines.

How do I compile my application to work on all the machines?
Watch Question

You want the oldest PIA that you might encounter.  I find the XP / 2002 version works fine unless you specifically need to use any of the new-fangled functionality.


Do I need to do anything special to deploy a .NET application which uses Office PIAs? The last time I went to customer's place and copied the executable, I got some error (I dont remember) about Office PIA being not found, or something.

This has got nice step by step directions on using the PIA:


Pretty easy to do it wrong.  My PIA's weren't installed properly (although the install said it went fine), and it took me some time before I noticed our setup program was actually distributing and registering my copy of Excel.exe because it was a reference.  So after getting the PIA installed and referenced properly, refresh your setup program and look at what is being deployed.  My red flag I missed was looking at the references in my application and noticing that only 2 of the 3 office assemblies were in the gac (the other was actually using Excel).  If you run into that, I can give you the secret to fixing it.
Unlock this solution and get a sample of our free trial.
(No credit card required)


Please keep this open for some more time.
Forced accept.

EE Admin

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.