title: C#: Datagrid to Excel .Cell border is missing in the created excel file
body: <p>I am trying to create an excel file from datagrid in my asp.net page using the below code.I am able to create the excel file.But the created excel file does not has the cell borders.Without the cell borders,it looks like a word document.</p>
  
  <p><img src="https://i.stack.imgur.com/X8o7v.png" alt="alt text"></p>
  
  <p>My code is</p>
  
  <pre><code>        Response.Clear();
          Response.Buffer = true;
          Response.ContentType = "application/vnd.ms-excel";
          Response.AddHeader("content-disposition", "attachment;filename=asas.xls");
          Response.Charset = "";
          this.EnableViewState = false;
          System.IO.StringWriter oStringWriter = new System.IO.StringWriter();
          System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);
          this.ClearControls(dgShipping);
          dgShipping.AllowPaging = false;
          DisplayRecords();
          dgShipping.RenderControl(oHtmlTextWriter);
          Response.Write(oStringWriter.ToString());
          Response.End();
          dgShipping.AllowPaging = true;
  </code></pre>
  
  <p>Any workarounds for this ? Thanks for help</p>