title: Export Excel with header in c# using XLWorkbook
body: <p>I want to export DataTable to excel with some heading. I am using XLWorkbook for exporting to excel. My code exporting DataTable to excel perfectly but i dont know how to add some header.</p>
  
  <p>I want Excel like Below</p>
  
  <p><a href="https://i.stack.imgur.com/TvSap.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TvSap.png" alt="I want Excel Like that"></a></p>
  
  <p>here is my c# Code </p>
  
  <pre><code>   public void ExportDataToExcel(DataTable dt, string fileName)
      {                                          
              using (XLWorkbook wb = new XLWorkbook())
              {
                  wb.Worksheets.Add(dt);                    
                  wb.Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
                  wb.Style.Font.Bold = true;
  
                  Response.Clear();
                  Response.Buffer = true;
                  Response.Charset = "";
                  Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
                  Response.AddHeader("content-disposition", "attachment;filename=" + fileName + ".xlsx");
  
                  using (MemoryStream MyMemoryStream = new MemoryStream())
                  {
                      wb.SaveAs(MyMemoryStream);
                      MyMemoryStream.WriteTo(Response.OutputStream);
                      Response.Flush();
                      Response.End();
                  }
              }                      
      }
  </code></pre>