CSDN博客

img cocosoft

如何用C#在Excel中生成图表?

发表于2004/9/17 22:18:00  2280人阅读

exc.Charts.Add(Missing,Missing,1,Missing); 
    exc.ActiveChart.ChartType=Excel.XlChartType.xlColumnClustered;
    exc.ActiveChart.SetSourceData(worksheet.get_Range("A1","B10"),Excel.XlRowCol.xlColumns);
    exc.ActiveChart.Location(Excel.XlChartLocation.xlLocationAsObject,"sheet1");
    exc.ActiveChart.HasTitle=true;
    exc.ActiveChart.ChartTitle.Text="图表名称";
    exc.ActiveChart.HasDataTable=false;
0 0

相关博文

我的热门文章

img
取 消
img