title: Setting Excel chart title programmatically
body: <p>How to set a chart title with C# and Interop?</p>
  
  <p>Actually trying:</p>
  
  <pre><code>            Excel.Range chartRange;
  
              Excel.ChartObjects xlCharts = (Excel.ChartObjects)xlsSheet.ChartObjects(Type.Missing);
              Excel.ChartObject myChart = (Excel.ChartObject)xlCharts.Add(10, 80, 300, 250);
              Excel.Chart chartPage = myChart.Chart;
  
              chartRange = xlsSheet.Range[xlsSheet.Cells[1, 1], xlsSheet.Cells[ar.GetLength(0), ar.GetLength(1)]];
              chartPage.SetSourceData(chartRange, Excel.XlRowCol.xlRows);
              chartPage.ChartType = Excel.XlChartType.xl3DColumn;
              chartPage.Location(Excel.XlChartLocation.xlLocationAsNewSheet, oOpt);
  
              chartPage.HasTitle = true;
              chartPage.ChartTitle.Text = "HeaderText";
  </code></pre>
  
  <p>Giving sweet</p>
  
  <p>"System.Runtime.InteropServices.COMException"</p>
  
  <p>Error HRESULT E_FAIL has been returned from a call to a COM component</p>