Show an Excel spreadsheet on a form

B

BobRoyAce

I am using Visual Studio 2008 to create a Windows form application.

The application has a form that lists, in a grid at the top of a form,
all of the spreadsheets that the user can view. What I want to do is
make a way, via a button on the form, for the user to open the
selected spreadsheet in the list. However, I'd like to have the
spreadsheet open in a "control" at the bottom of the form. I would
also like to have another button on the form that would allow the user
to do a Save As of the file.

How can I accomplish this?
 
B

BobRoyAce

By the way, one thing that I tried was putting a WebBrowser control at
the bottom of the form, and executing the following line of code:

WebBrowser1.Navigate("file://" & _SpreadsheetFolder &
oSpreadsheet.SpreadsheetFilename)

However, what happens is that the user is prompted as to whether they
want to OPEN or SAVE the file. Then, if they click on OPEN, it opens
the file in a completely different window, not within my application.
It also shows a message in the WebBrowser saying "Navigation to the
webpage was canceled" message.
 
J

Jeff Johnson

I am using Visual Studio 2008 to create a Windows form application.

The application has a form that lists, in a grid at the top of a form,
all of the spreadsheets that the user can view. What I want to do is
make a way, via a button on the form, for the user to open the
selected spreadsheet in the list. However, I'd like to have the
spreadsheet open in a "control" at the bottom of the form. I would
also like to have another button on the form that would allow the user
to do a Save As of the file.

How can I accomplish this?

In the COM world I'd suggest putting an OLE object on your form and hosting
Excel within it. I have no idea how to do it in .NET without using a
specialized control like FarPoint Spread.
 
B

BobRoyAce

In the COM world I'd suggest putting an OLE object on your form and hosting
Excel within it. I have no idea how to do it in .NET without using a
specialized control like FarPoint Spread.

So, anyone out there know how this can be done in .NET? Why is
WebBrowser method not working?
 
B

BobRoyAce

In the COM world I'd suggest putting an OLE object on your form and hosting
Excel within it. I have no idea how to do it in .NET without using a
specialized control like FarPoint Spread.

So, anyone out there know how this can be done in .NET? Why is
WebBrowser method not working?
 
B

BobRoyAce

In the COM world I'd suggest putting an OLE object on your form and hosting
Excel within it. I have no idea how to do it in .NET without using a
specialized control like FarPoint Spread.

So, anyone out there know how this can be done in .NET? Why is
WebBrowser method not working?
 
Joined
Jul 13, 2009
Messages
2
Reaction score
0
I was just wondering if you ever found a solution to this problem? I'm running into the same issue developing with VS 2008 trying to embed a word 2007 or excel 2007 document in a VB.Net form. Using IE7, XP-SP3.
 

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