bill wrote:
All,
I cannot find any examples of doing Excel automation from a VC++ .Net
environment. Does anyone ay least know what the namespace should be to
expose the Excel app? i.e.
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