Excel Charts in VB.NET app

D

DIOS

I have built a very solid application for my department that embeds an
Excel workbook and displays its charts via an OLE object. Its worked
great for probably 10 years or so and it was built on VB6. I'm
currently porting all the algorithms to VB2005 and am currently
struggling to find a decent way to display the Excel charts. There is
no OLE object in .NET and the only thing I can think of is to save the
Excel chart as a graphic or PDF on the disk and then display that in a
container. It appears clunky to me and if I change some stuff on the
chart programmatically that means i would have to do the chart saves
every time.

Anyone have a suggestion or solution that i can take a look at for
this challenge?


AGP
 
G

Gregory A. Beamer

Anyone have a suggestion or solution that i can take a look at for
this challenge?

I don't have a solution, but there should be no reason you cannot use
the VSTO bits to automate viewing Excel in .NET.

Here is one example I found on the web:
http://snurl.com/tlgki

Peace and Grace,

--
Gregory A. Beamer (MVP)

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
D

DIOS

Replace the Excel object with a .Net chart object.  That way you only need
interop to access the source data, which simplifies the process
considerably.http://weblogs.asp.net/ricardoperes/archive/2008/11/06/microsoft-char...

Thank you both so much for the suggestions. On the first suggestion as
i noted that is exactly what Im doing now. Saving as a graphic and
loading into a container. works but if i need to do changes and update
it seems clumsy to save and load over and over. On the second
suggestion there is alot of interaction with Excel charts that Im
afraid will not translate to a .NET chart object. There is just so
much customization and interaction with Excel-specific charts that it
will probably be time consuming to transfer functionality to a .NET
chart. Also, the user can save the state to a separate excel file
which works great and that may not work with a .NET chart object. I'll
take a more detailed look at the control but just cannot see how it
can replace what I have with Excel.

AGP
 
R

Rich

Hello,

Visual Studio 2005 and higher comes with a Report Control -- similar to the
Reporting Services app of Sql Server except that this runs inside your .net
app, and instead of rdl files you get rdlc files. If you go to your toolbox
you will see a Report control. Drag that onto a form. This will
automatically create an rdlc file. In the rdlc you can add tables,
textboxes, labels, charts, lists, ...

From here you will have to read the documentation on the Visual Studio
Report control. Here is a link to help you get started:

http://msdn.microsoft.com/en-us/library/bb558708.aspx

Rich
 
D

DIOS

Hello,

Visual Studio 2005 and higher comes with a Report Control -- similar to the
Reporting Services app of Sql Server except that this runs inside your .net
app, and instead of rdl files you get rdlc files.  If you go to your toolbox
you will see a Report control.  Drag that onto a form.  This will
automatically create an rdlc file.  In the rdlc you can add tables,
textboxes, labels, charts, lists, ...  

From here you will have to read the documentation on the Visual Studio
Report control.  Here is a link to help you get started:

http://msdn.microsoft.com/en-us/library/bb558708.aspx

Rich

I don't follow the reasoning for the Report Control. I am looking for
a way to efficiently display an Excel chart within my app. The chart
will get updated with the users customization.

AGP
 
E

Ed.

Hello,
We do similar in vb6. I found this online - take a look.
http://www.daniweb.com/forums/thread21529.html#

It's not working for me - I can't find the control (using VS2008) but you
may have better luck.

Sorry I don't have more, but this may help?

ATB - Ed.

Hello,

Visual Studio 2005 and higher comes with a Report Control -- similar to
the
Reporting Services app of Sql Server except that this runs inside your
.net
app, and instead of rdl files you get rdlc files. If you go to your
toolbox
you will see a Report control. Drag that onto a form. This will
automatically create an rdlc file. In the rdlc you can add tables,
textboxes, labels, charts, lists, ...

From here you will have to read the documentation on the Visual Studio
Report control. Here is a link to help you get started:

http://msdn.microsoft.com/en-us/library/bb558708.aspx

Rich

I don't follow the reasoning for the Report Control. I am looking for
a way to efficiently display an Excel chart within my app. The chart
will get updated with the users customization.

AGP
 

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