Open Excel in my own window

  • Thread starter Christoffer Bergman
  • Start date
C

Christoffer Bergman

I have seen this question in other posts on this group, but I haven't been
able to find an answer.

I am using automation to control Excel as described in many technical
articles on MSDN (e.g. 178749, 186122, 192348, and 308292), but all those
articles opens Excel in a new Window (as if you would have started Excel
yourself from the Start-menu).

I want to open Excel in my own window within my own application, as Internet
Explorer does if you browse to an Excel document from within that application.

I know that this is possible, but I cannot find any clue to how to do it
anywhere, can someone please help me.

I am using Visual C++ 6.0 and MFC 4.2. My project is created as MFC
AppWizard (exe) created as "Dialog based". I have imported the Excel 2002
type library and I have created and instance of the _Application class and I
am able to use the _Workbook and other objects within the type library. Now I
just want to do it within my own window.

Thanks
/Christoffer
 
K

klaus triendl

I want to open Excel in my own window within my own application, as
Internet
Explorer does if you browse to an Excel document from within that
application.

I know that this is possible, but I cannot find any clue to how to do it
anywhere, can someone please help me.

I am using Visual C++ 6.0 and MFC 4.2. My project is created as MFC
AppWizard (exe) created as "Dialog based". I have imported the Excel 2002
type library and I have created and instance of the _Application class
and I
am able to use the _Workbook and other objects within the type library.
Now I
just want to do it within my own window.

i don't know how it is with vc++6.0.
in vc++7.0 you can create a new solution specifying that you want compound
document support (active document container).
you may find a similar option in vc++6.0; otherwise try out the
document/view architecture and use a COleDocument.
 

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

Top