We help IT Professionals succeed at work.

Compiling using Office PIAs

rajesh_khater
on
216 Views
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?
Comment
Watch Question

Commented:
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.

Author

Commented:
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.

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

http://msdn2.microsoft.com/en-us/library/aa163987(office.10).aspx 

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.
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

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

Computer101
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.

OR

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.