Home All Groups Group Topic Archive Search About

How to embed the excel worksheet into my forms?

Author
8 Feb 2006 12:55 PM
zhangyl
I want to embed the excel worksheet into my application and use it like
datagrid, if somebody can tell a solution, whether visual studio 2005 can do
it ?
thanks.

Author
8 Feb 2006 7:07 PM
Herfried K. Wagner [MVP]
"zhangyl" <zhan***@mail.nai.edu.cn> schrieb:
>I want to embed the excel worksheet into my application and use it like
>datagrid, if somebody can tell a solution, whether visual studio 2005 can
>do it ?

Unfortunately .NET 2.0 still does not support an OLE container control.

HOWTO: Use the WebBrowser Control to Open an Office Document in Visual Basic
..NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;304643>

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
9 Feb 2006 8:37 AM
zhangyl
thank you.
But how can I handle events of the excel application in the webbrowser
control?

"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at>
??????:u$ZrmLOLGHA.3***@TK2MSFTNGP11.phx.gbl...
Show quoteHide quote
> "zhangyl" <zhan***@mail.nai.edu.cn> schrieb:
>>I want to embed the excel worksheet into my application and use it like
>>datagrid, if somebody can tell a solution, whether visual studio 2005 can
>>do it ?
>
> Unfortunately .NET 2.0 still does not support an OLE container control.
>
> HOWTO: Use the WebBrowser Control to Open an Office Document in Visual
> Basic
> .NET
> <URL:http://support.microsoft.com/?scid=kb;EN-US;304643>
>
> --
> M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
> V B   <URL:http://classicvb.org/petition/>
Author
9 Feb 2006 12:39 PM
Herfried K. Wagner [MVP]
"zhangyl" <zhan***@mail.nai.edu.cn> schrieb:
> But how can I handle events of the excel application in the webbrowser
> control?

I don't think this is supported by this approach.  You could try to use
'GetObject' to get a reference to the Excel instance running inside IE, but
I have never tried that.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
10 Feb 2006 4:27 AM
zhangyl
Thank you. I have tried it successfully.

"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at>
??????:eGaQvXXLGHA.***@TK2MSFTNGP09.phx.gbl...
Show quoteHide quote
> "zhangyl" <zhan***@mail.nai.edu.cn> schrieb:
>> But how can I handle events of the excel application in the webbrowser
>> control?
>
> I don't think this is supported by this approach.  You could try to use
> 'GetObject' to get a reference to the Excel instance running inside IE,
> but I have never tried that.
>
> --
> M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
> V B   <URL:http://classicvb.org/petition/>