title: C# Adding secondary Axis using Excel Interop
body: <p>I built and application that will create an Excel spreadsheet from an SQL database.  It originally had three series and the following code works great.  However, I am now being asked to add two new series that scale differently in a secondary axis.  I've added the ranges but I cannot add the secondary axis using Excel interop. </p>
  
  <p>Has anyone done this before and if so what am I missing?</p>
  
  <pre><code> ChartObjects xlCharts = (Excel.ChartObjects)mSheet.ChartObjects(Type.Missing);
  
   ChartObject myChart = (Excel.ChartObject)xlCharts.Add(358, (double)xlsRange.Top, 650, 350);
   myChart.Name = "myCool_Chart";
   Chart chartPage = myChart.Chart;
   chartPage.ChartType = XlChartType.xlLine;
   Series series = myChart.Chart.SeriesCollection().Add(dSheet.Range["$F$2:$H$124,$P$2:$Q$124"]);//F thru H is left axis and P thru Q should be secondary axis            
   series.XValues = dSheet.Range["$C$2:$C$124"];// Quart and Year values on bottom axis            
   chartPage.SeriesCollection(1).Name = "My first series";
   chartPage.SeriesCollection(2).Name = "My Second Series";
   chartPage.SeriesCollection(2).Format.Line.ForeColor.RGB = (int)XlRgbColor.rgbDarkOrange;            
   chartPage.SeriesCollection(3).Name = "My Third Series";
   chartPage.SeriesCollection(4).Name = "My fourth Series"; //this series should be secondary
   chartPage.SeriesCollection(5).Name = "My fifth Series";  //this series should be secondary
  </code></pre>