Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Integrate Excel SpreadSheet in Windows Form

Status
Not open for further replies.

mir23

Programmer
Oct 28, 2003
11
BE
Hello,

I want to visually integrate an Excel spreadsheet in a Windows form. I am using VS.NET 2005 and Excel 2002.

I know about the Visual Studio Tools for Office introduced with VS.NET 2003, but it doesn't actually enable a user to manipulate a spreadsheet in a windows form.

It would be exactly like an Excel ActiveX control in IE but in a windows form instead.

Does any one know how to make this or even a commercial component that does the trick?

Thank you very much for your help,

Mir


 
Not sure about Excel appearing within the bounds of a form (embedding it), although it is more than likely possible. Its easy enough to launch Excel from your app.
Code:
dim oApp as  New Excel.Application
oApp.DisplayAlerts = False
oApp.WindowState = Excel.XlWindowState.xlMinimized
oApp.Visible = True
You'll also need to add a reference to Microsoft Excel in your project.


Sweep
...if it works, you know the rest..
Always remember that Google is your friend

curse.gif
 
Hi,
Thanks for the response.
But this would open an Excel application running aside from the form. Instead, it's an embeded speadSheet within the Windows Form that I need.

I just heard about the aximp.exe component that create an ActiveX control wrapper from a COM application (and why not Excel) to use in the .NET manage environment.
Maybee that's one anwser I should explore...
Or does anyone have another good solution ?

Thanks
 
I've heard Office 2k7 is supose to be significantly more .Net friendly. But I do not know of any way to display an excel spreadsheet in a windows.form. The only things I could think of would be the ActiveX wrapper you mentioned, or running excel in parallel and mirrior it to a flex grid. Mirrioring would likely take a decent amount of work if you wanted to be able to use formulas and what not. You'd have to set up some process to go back and forth to get the formula value and the display value. You might want to investigate 3rd party tools that may already do this for you.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Thank Rick,

I definitively have a preference for a 3rd party tools but I have no idea which one would be the more reliable, does anybody knows a good one?

Thanks,
Mir
 
Isn't it possible to show it in a webbrowser? So if you put a webbrowser component on your form and open the excell file in that then you would get something similar. Quick and real dirty but it could work.

Christiaan Baes
Belgium

"My new site" - Me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top