Question : Combination Chart

Hi
    I try to make combination colum and line chart in excel throug c# with vs2008.
 I giving what output i geting and my code and  what  out i need which i manualy created in excel and step
pls find attachment and code

In attachment Mychart sheet Output i geting through c# coding;
Sheet1 from A1 to C20  input i using
 from G4  to N19 my required output
From A24  to A33  Steps for crearing that output


I need to know how make that graph in excel through c# vss2008
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
private void button4_Click(object sender, EventArgs e)
            
             {
 Excel.Application oXL = new Microsoft.Office.Interop.Excel.Application();
             Excel.Workbook oWB;
             Excel.Worksheet oWS;
             oWB = oXL.Workbooks.Add(Missing.Value);
             oWS = (Excel.Worksheet)oWB.Worksheets.get_Item(1);
             Excel.Range oResizeRange;
             object misValueDelComp = System.Reflection.Missing.Value;
             oResizeRange = oWS.get_Range("A1:C20", Missing.Value).get_Resize(Missing.Value,Missing.Value);

 Excel.Chart chart = AddChart(oWB, " mychart ", "the chart title", Excel.XlChartType.xlColumnClustered, oResizeRange, Excel.XlRowCol.xlRows);
 oWB.SaveAs("TestGraph.xls", Excel.XlFileFormat.xlWorkbookNormal, misValueDelComp, misValueDelComp, misValueDelComp, misValueDelComp, MyExcel.XlSaveAsAccessMode.xlExclusive, misValueDelComp, misValueDelComp, misValueDelComp, misValueDelComp, misValueDelComp);



}



 public static Excel.Chart AddChart(Excel.Workbook workbook, string chartSheetName, string title, Excel.XlChartType chartType, Excel.Range dataRange, Excel.XlRowCol byRowOrCol)
             {
                 Excel.Chart chart;
                 chart = (Excel.Chart)workbook.Charts.Add(Type.Missing, Type.Missing, Type.Missing, Type.Missing);
                 chart.ChartType = chartType;
                 chart.Location(Excel.XlChartLocation.xlLocationAutomatic, chartSheetName);
                 chart.SetSourceData(dataRange, byRowOrCol);
                 chart.HasTitle = true;
                 chart.ChartTitle.Text = title;
                 return chart;
             }
Attachments:
 
Pls find it
 

Answer : Combination Chart

Your client config is wrong.  You have:

      http://server/shot

You need:

     http://server/shot/service

I just tested and when I remove the /service in my client config I get the same 302 redirect error.
Random Solutions  
 
programming4us programming4us