> All,
>
[quoted text clipped - 3 lines]
>
> using namespace System::?????????????????
Are you doing managed C++ or native (aka unmanaged) C++?
For managed, you use the same manage PIAs (Primary Interop Assemblies) and
namespaces as you would for C# or VB.NET.
For unmanaged, you program Excell through it's OLE Automation (aka COM)
interface. Your best bet to get started is to look up the #import compiler
directive, and then try
#import "progid:Excel.Sheet"
The #import directive will create C++ wrappers that allow you to call the
OLE interfaces as comfortably as you could from VB6. The declarations will
be (by default) placed in a namespace with the same name as the library.
IIRC, you may also need to #import one or more common MS Office type
libraries (e.g. MSGraph.Application) in order to have full access to the
Excel API.
-cd
bill - 28 Sep 2005 13:36 GMT
I am doing managed C++. I cannot seem to get the reference to the Excel
"object". I have the following references:
Excel
Microsoft.Office.Core
I cannot seem to figure out how to declare an Excel app from C++. I
also notice that intellisense works with all the references except for
Excel. Any pointers to examples that you can share. I have been
googling around in my spare time but cannot find anything useful (so
far).
TIA,
Bill
Carl Daniel [VC++ MVP] - 28 Sep 2005 14:33 GMT
> I am doing managed C++. I cannot seem to get the reference to the
> Excel "object". I have the following references:
[quoted text clipped - 7 lines]
> googling around in my spare time but cannot find anything useful (so
> far).
I have no experience controlling Excel from managed C++ (or any managed
language, for that matter). You might try posting in
microsoft.public.dotnet.framework.interop
and/or the VSTO group where you probably have a better chance of finding
someone that's been down your particular road before.
-cd