Excel Control

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

Guest

hello,
i've got a very simple requirment,
i want to load excel into a WindowsForm (just like Iexplore.exe can load
excel)

I'm guessing that this is gonna be done with Ole automation somehow?
anyone got any ideas?

.... things to note
I don't want to use a datagrid, i really need excel
I don't want to use the excel web component
I don't want to create the ExcellApplication and set it's parent to my forms
and it's location in my form (this cause activation problems)
basically I really want excel application running and in my form..

this one had me beat that the moment....

thanks for any help offered
 
Brian,

You aren't going to be able to do this without a LOT of work.
Basically, you will have to implement all of the interfaces to make your
windows form an Active Document Container (and there are a good number of
them). Microsoft was going to release a .NET control which was going to do
this in .NET 2.0, but it was scrapped, I believe.

There was a control in VB6 which you could use to host OLE documents,
you might want to try importing that into your project and using that.

Hope this helps.
 
Brian Keating said:
hello,
i've got a very simple requirment,
i want to load excel into a WindowsForm (just like Iexplore.exe can load
excel)

I'm guessing that this is gonna be done with Ole automation somehow?
anyone got any ideas?

As Nicholas has said there's no easy way to do it. The closest you can get
without alot of work is to use a webcontrol and open the document in it.
Unfortunately, as you appear to've noticed there's no way to merge menus with
it. I've googled without success for 3rd party control/example program that
did the same thing you want without success. Unfortunately it doesn't appear
that one exists. If you do have any more success than I did please drop me
an email.
 
Thanks Nicholas,
helps alot, i may try this vb6 control and see how i get on. thanks again
brian

Nicholas Paldino said:
Brian,

You aren't going to be able to do this without a LOT of work.
Basically, you will have to implement all of the interfaces to make your
windows form an Active Document Container (and there are a good number of
them). Microsoft was going to release a .NET control which was going to do
this in .NET 2.0, but it was scrapped, I believe.

There was a control in VB6 which you could use to host OLE documents,
you might want to try importing that into your project and using that.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Brian Keating said:
hello,
i've got a very simple requirment,
i want to load excel into a WindowsForm (just like Iexplore.exe can load
excel)

I'm guessing that this is gonna be done with Ole automation somehow?
anyone got any ideas?

... things to note
I don't want to use a datagrid, i really need excel
I don't want to use the excel web component
I don't want to create the ExcellApplication and set it's parent to my
forms
and it's location in my form (this cause activation problems)
basically I really want excel application running and in my form..

this one had me beat that the moment....

thanks for any help offered
 
Thanks dan,
i'll let you know how i get on.

Dan Neely said:
As Nicholas has said there's no easy way to do it. The closest you can get
without alot of work is to use a webcontrol and open the document in it.
Unfortunately, as you appear to've noticed there's no way to merge menus with
it. I've googled without success for 3rd party control/example program that
did the same thing you want without success. Unfortunately it doesn't appear
that one exists. If you do have any more success than I did please drop me
an email.
 
thanks for pointing me in right direction
i'm going creating my own container. (cut and past mostly)
http://support.microsoft.com/default.aspx?scid=kb;en-us;311765

thanks ever so much

Nicholas Paldino said:
Brian,

You aren't going to be able to do this without a LOT of work.
Basically, you will have to implement all of the interfaces to make your
windows form an Active Document Container (and there are a good number of
them). Microsoft was going to release a .NET control which was going to do
this in .NET 2.0, but it was scrapped, I believe.

There was a control in VB6 which you could use to host OLE documents,
you might want to try importing that into your project and using that.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Brian Keating said:
hello,
i've got a very simple requirment,
i want to load excel into a WindowsForm (just like Iexplore.exe can load
excel)

I'm guessing that this is gonna be done with Ole automation somehow?
anyone got any ideas?

... things to note
I don't want to use a datagrid, i really need excel
I don't want to use the excel web component
I don't want to create the ExcellApplication and set it's parent to my
forms
and it's location in my form (this cause activation problems)
basically I really want excel application running and in my form..

this one had me beat that the moment....

thanks for any help offered
 
Brian Keating said:
Hi Dan,

There is light at end of tunnel!
http://support.microsoft.com/default.aspx?scid=kb;en-us;311765

I'm going to implement my own so thanks again

Cool. Is the MS code sample licenced for reuse by 3rd parties? I didn't
see anything eitherway in the installers clickware. If possible I'd prefer
not to reinvent the wheel. The vb6 app mostly converted to .net. I probably
won't have an immediate chance to investigate what's involved with the stuff
it couldn't update. My need for the functionality is the better part of a
year away, knowing it exists is good enough for the design stage.
 
Dan Neely said:
The vb6 app mostly converted to .net. I probably
won't have an immediate chance to investigate what's involved with the stuff
it couldn't update.

I had a chance to play with it abit this afternoon. I was able to fix
everything except webfile access (don't need it) and print (low priority),
and started experimenting with it. It appears to have _almost_ everything I
need. I discovered one missing feature that's going to draw alot of flak
though. The track changes features are greyed out in the menu. The vb6 demo
was the same way so I know it's not a conversion issue. Potentially this
might be a killer flaw.

So close, and yet so far.
 
Back
Top