Chart No Show by Using ChartWizard - 2007 Excel, C#

P

Peter

Hi folks,
I use the following C# code, trying to create a chart by using
ChartWizard method in 2007 Excel environment. The code is listed below:

myChart.ChartWizard (rng, Excel.Constants.xl3DBar,
Type.Missing, Excel.XlRowCol.xlColumns, 2, 2, false,
mySheet.Name,
Type.Missing,
Type.Missing, Type.Missing);

But I can not see the chart after the execution. Please advise. Thanks.
Peter Kao
 
J

Jon Peltier

Looks like all the parameters are in the right places. I have never used
this method, and can't comment specifically about the C# implementation.

The Excel 2003 VBA documentation states:

"Modifies the properties of the given chart."

This indicates to me that the method is for modifying a chart, not creating
a new chart.

- Jon
 
P

Peter

Thanks Jon,
The document is right, method ChartWizard is to configure a chart
after a chart object is added into its chart collection, and finally activate
it. It works.
Peter Kao
 

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