embed Excel object in Winform using .Net

T

Thomas

It sounds a piece of cake but It is surprisingly frustrating to do. I
have a winform which receives data from database and present them as
Excel chart and spreadsheet. It is required by the client. I
can use Office Web Control to generate chart. However the chart can
only be export to a gif image, not Excel chart. bummer. I also tried
WebBrowser Control, but it can only open an Excel file from web or hard
drive. I cannot figure out how to create an Excel object and pass it to
the WebBrowser object. I dont want to use DsoFramer because MS doesnt
support it, plus it suffers the same shortcoming of WebBrowser.

What I need to do is to create an in-memory Excel object, populate it
with data and embed it in the winform, for the client wants to save a
copy of the file and do some further processing. Too bad the ole
container in VB is gone. Can someone suggest some main stream solution
to this problem. I am not very savvy at windows programming.

Thanx
 
M

Michael Nemtsev

Hello Thomas,

See there http://www.dotnet247.com/247reference/msgs/55/277921.aspx

T> It sounds a piece of cake but It is surprisingly frustrating to do. I
T> have a winform which receives data from database and present them as
T> Excel chart and spreadsheet. It is required by the client. I
T> can use Office Web Control to generate chart. However the chart can
T> only be export to a gif image, not Excel chart. bummer. I also tried
T> WebBrowser Control, but it can only open an Excel file from web or
T> hard
T> drive. I cannot figure out how to create an Excel object and pass it
T> to
T> the WebBrowser object. I dont want to use DsoFramer because MS doesnt
T> support it, plus it suffers the same shortcoming of WebBrowser.
T> What I need to do is to create an in-memory Excel object, populate it
T> with data and embed it in the winform, for the client wants to save a
T> copy of the file and do some further processing. Too bad the ole
T> container in VB is gone. Can someone suggest some main stream
T> solution to this problem. I am not very savvy at windows programming.
T>
T> Thanx
T>
---
WBR,
Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
T

Thomas

Michael,

I just out of my Thanksgiving dinner and see your post. I took a quick
look and it is very promising. Thanks alot.
 

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