Excel embedding - Use the WebBrowser or the OleContainer?

Calling Deborah Pate, Deborah Pate to the rescue, please :)

After perusing borland.public.delphi.oleautomation and Deja, Deborah's
homepage and its referred sites, I still struggle with Excel and embedding.

The two main approaches have been to use a TOleContainer to host Excel, or
to open the Excel worksheet in the TWebBrowser.  Both sort of works, and
both sort of have problems.

A few words about the hosting application.  It is a financial info app that
has a minimal main window, almost toolbarlike, and multiple freefloating
window, each containing their respective toolbars.  It delivers realtime
data that can be embedded into Excel using DDE.

There are problems with DDE either not updating or stopping to update, as
well as seemingly random exceptions, especially when you also try to use
Excel outside the application.  I want to stress that DDE works flawlessly
when used from a standalone Excel.

The most stable solution seems to be to use the TWebBrowser to host the
Excel Workspace, maybe because MS wrote both?  My main challenge here,
beeing rather green on COM - is that I can't figure out how to make the
ToolBars appear, neither can I get hold of the Excel menu. I know it must be
possible, because if I right click in the Workspace, and add a chart, it
appears with its toolbar floating, and when I dock the chart toolbar, I can
turn on all the other bars as well.

I would appreciate if someone could outline how I can access the Excel
workspace through the TWebBrowser instance after I have loaded the
worksheet, and how I would make the Excel Toolbars appear (and the menu, if

I have also experienced that the hidden main Excel app will appear if I
create a new Excel worksheet from the Start Menu.  Is there any way of
preventing this?

I would also appreciate if you notify me by email, so that I don't miss any
answers.  I will post any followup questions to the newsgroup.

Lars F.

/ Software Development Manager, Nordic Development Group
/ REUTERS Norge AS, Stortorvet 10, N-0155 OSLO, Norway
/ Tel +47 2293 6900 Dir +47 2293 6939 Fax +47 2242 5032
/ Lars.Fos...@Reuters.com (Private: L...@Fosdal.com)