title: c# Merged cells as header address epplus
body: <p>How do I set HeaderAddress to two cells of a clustered bar chart in EPPlus? I have the below data from my database output, where first column is as you can see merged cells.</p>
  
  <p><a href="https://i.stack.imgur.com/3diAp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3diAp.png" alt="enter image description here"></a></p>
  
  <p>I am looking for the following layout of the data <a href="https://i.stack.imgur.com/NTjDV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NTjDV.png" alt="enter image description here"></a></p>
  
  <p><em>Please take note that the images are from a replica of the data, but generated inside Excel.</em></p>
  
  <p>What I've tried so far is basically</p>
  
  <pre><code>ExcelChartSerie s = chart.Series.Add(axis.Address, xAxis.Address);
  s.HeaderAddress = new ExcelAddress(startRow + r, GetColumnNumberByName(startColumn), startRow + 1, GetColumnNumberByName(startColumn) + 1);
  </code></pre>
  
  <p>where I more or less select the current row and two columns. This gives me <strong>"Address must be a row, column or single cell"</strong>, but in order to get this to work, I must select multiple cells, no?</p>