| 扬's profileYOUYANG @UU@PhotosBlogLists | Help |
|
18/04/2009 CreateChart// C# private void CreateChart() { // Now create the chart. Excel.Chart xlChart = (Excel.Chart)ThisWorkbook.Charts. Add(Type.Missing, xlSheet, Type.Missing, Type.Missing); Excel.Range cellRange = (Excel.Range)xlSheet.Cells[1, 1]; xlChart.ChartWizard(cellRange.CurrentRegion, Excel.Constants.xl3DBar, Type.Missing, Excel.XlRowCol.xlColumns, 1, 2, false, xlSheet.Name, Type.Missing, Type.Missing, Type.Missing); // Apply some formatting to the chart. xlChart.Name = xlSheet.Name + " Chart"; Excel.ChartGroup grp = (Excel.ChartGroup)xlChart.ChartGroups(1); grp.GapWidth = 20; grp.VaryByCategories = true; xlChart.ChartTitle.Font.Size = 16; xlChart.ChartTitle.Shadow = true; xlChart.ChartTitle.Border.LineStyle = Excel.Constants.xlSolid; } TrackbacksThe trackback URL for this entry is: http://youyang.spaces.live.com/blog/cns!A06EB335BE796E8F!1914.trak Weblogs that reference this entry
|
|
|