Excel Object Library(s)??

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to read/write Excel files but I am having trouble getting started.
Using MS article 302084 as a cookbook, I try to add the reference for MS
Excel Object Library. Two versions are listed, 5 & 11. If I use 11, then then
all references to Excel fail. If I use 5, the next step in the example
fails:

Excel.Application oXL = new Excel.Application() ; //fails

I can do this:

Excel._ExcelApplicationClass xl = null ;
xl = new Excel._ExcelApplicationClass() ;

but I stopped there since I have no documentation, and trying to work
parallel to the example fails.

How do I get started? (VS 7.1, Office Small Business Edition 2003)
 
Hi,

Are you using the primary interop assemblies? Even though they are included in
Office 2003, they are not installed by default (Typical install) and are not
installed when you add a reference to a MS office type library. This could be
the problem with the 11 object library references.

I haven't done Excel automation, but I've done Outlook automation using the
interop assemblies without any problems.

Here is a MS article on the primary interop assemblies for Office 2003:
<http://msdn.microsoft.com/library/d...kInstallingOfficePrimaryInteropAssemblies.asp>

Hope this helps.

Best regards,

Rodger

Time Management Guide - Make better use of your time
<http://www.TimeThoughts.com/timemanagement.htm>
 

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

Back
Top