title: Export the dataGridView to Excel with all the cells format
body: <p>I have this code that I know that it works fast</p>
  
  <pre><code>CopyAlltoClipboard(dataGridViewControl);
  Microsoft.Office.Interop.Excel.Application xlexcel;
  Microsoft.Office.Interop.Excel.Workbook xlWorkBook;
  Microsoft.Office.Interop.Excel.Worksheet xlWorkSheet;
  object misValue = System.Reflection.Missing.Value;
  xlexcel = new Excel.Application();
  xlexcel.Visible = true;
  xlWorkBook = xlexcel.Workbooks.Add(misValue);
  xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);
  xlWorkSheet.Name = page.Name;
  Excel.Range CR = (Excel.Range)xlWorkSheet.Cells[1, 1];
  CR.Select();
  xlWorkSheet.PasteSpecial(CR, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, true);
  ((Microsoft.Office.Interop.Excel.Range)xlWorkSheet.Range["A1"]).EntireColumn.Delete(null); // delete the first column that has rows indexes
  xlWorkBook.SaveAs(fileName);
  
  private void CopyAlltoClipboard(DataGridView dataGridViewControl)
  {
      dataGridViewControl.SelectAll();
      DataObject dataObj = dataGridViewControl.GetClipboardContent();
      if (dataObj != null)
         Invoke((Action)(() =&gt; { Clipboard.SetDataObject(dataObj); }));
  }
  </code></pre>
  
  <p>The code works fine, but it does copy only the values is the excel, doesn't copy also the cells format (wrap text, backcolor, font, borders etc)
  Can anyone help me on this one? How to complete this code the have the exact format like in DataGridView?</p>