Embed Excel Workbook Inside Form VB .NET

S

Shawn

Does anybody know how to embed an Excel Worksheet into a (vb .net)
form?

I want the worksheet to appear as though it's a control on the form
with all the functionality of a worksheet. I don't necessarily need
all the toolbars because I will write code to manipulate the sheet
from the back end.

I've imported the Excel Object model reference but I'm at a loss of
how to display a worksheet object inside the form.

Thanks,
Shawn

PS
Excel 10.0 Object model
Windows XP
1.1 .NET Framework
 
P

Paul Clement

On 30 Jan 2004 07:13:12 -0800, (e-mail address removed) (Shawn) wrote:

¤ Does anybody know how to embed an Excel Worksheet into a (vb .net)
¤ form?
¤
¤ I want the worksheet to appear as though it's a control on the form
¤ with all the functionality of a worksheet. I don't necessarily need
¤ all the toolbars because I will write code to manipulate the sheet
¤ from the back end.
¤
¤ I've imported the Excel Object model reference but I'm at a loss of
¤ how to display a worksheet object inside the form.
¤

Since there is no OLE control in VB.NET the only alternative is to use the WebBrowser control:

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


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
S

Shawn

Since there is no OLE control in VB.NET the only alternative is to use the WebBrowser control:
HOWTO: Use the WebBrowser Control to Open an Office Document in Visual Basic .NET
http://support.microsoft.com/default.aspx?scid=kb;EN-US;304643


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)

I figured out that you can right click the toolbox, click "customize
toolbox", add the Microsoft Office Excel 10.0 COM component and you
now get a control just like I wanted. However, the worksheet that you
get doesn't have all the functionallity that a real excel sheet has. I
specifically was looking to import data as an excel web query.
Unfortunately, this part of the object model was not included in the
AxInterop.OWC10 reference that was added.
Any work around to using the "Tools -> Import Data -> WebQuery" part
of excel with the .Net Excel control add in?

Thanks Again,
Shawn
 

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