Display Charts Created In Excel In A Windows Form

A

Arvindtn

Hi,

I have several Excel files and each file has several Charts. I have a
requirement where i have to display the chart with data points in a windows
form.

In my WinForms code iam able to access the chart object through the
following code

Excel.ChartObjects chCharts =
(ChartObjects)oWorkSheet.ChartObjects(Missing.Value);
Excel.ChartObject chChart = chCharts.Item(1);

The problem is how do i use this ChartObject to be displayed in WinForm, I
tried using the AxChartSpace control, but iam not able to add this
chChartObject to it.

The idea is to re-use the charts that has already been created in excel
rather than to generate the chart dynamically in WinForms using AxChartSpace

I had been successfull in displaying the chart as an image in my WinForms
but this doesn't meet the requirement to display the Data Points for the
respective chart(i.e. if i move my mouse over a particular location in the
chart it doesn't show me a tooltip with values, as compared to my chart in
excel)

Thanks & Regards
Arvind T N
 

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