title: how to add checkbox control to Excel Cell dynamically through C# Code on export button click with SQL table Data
body: <p>In a C# application, I created a button export to Excel. The issue that I am having is that I need to Add Remove column at last as checkbox at the time of exporting excel Report. I have done some searching on google. and found some code, but it's adding CheckBox to entire sheet, not for specific cell.. and also I am not able to see remaining columns and data.. please help 
  find the following code  </p>
  
  <p>thanks in advance </p>
  
  <pre><code>dtRequests.AcceptChanges();
  string strFilename = "notificationMessage Report_" + DateTime.Now.ToString("dd/MM/yyyy") + ".xls";
  Response.ClearContent();
                      Response.Buffer = true;
                      Response.AddHeader("content-disposition", string.Format("attachment; filename={0}", strFilename));
                      Response.ContentType = "application/ms-excel";
  
                  string str = string.Empty;
                  foreach (DataColumn dtcol in dtRequests.Columns)
                  {
                      string columnName = string.Empty;
                      columnName = dtcol.ColumnName;
                      switch (columnName)
                      {
                          case "GroupName":
                              columnName = "Group Name";
                              break;
                          case "NotificationMessage":
                              columnName = "Notification Message";
                              break;
                          case "PartNumber":
                              columnName = "Part number";
                              break;
                          case "region":
                              columnName = "Region";
                              break;
                          case "Remove":
                              columnName = "Remove";
                              break;
                          default:
                              break;
                      }
                      if (!string.IsNullOrEmpty(columnName))
                      {
                          Response.Write(str + columnName);
                          str = "\t";
                      }
                  }
                  Response.Write("\n");
                  foreach (DataRow dr in dtRequests.Rows)
                  {
                      str = "";
                      for (int j = 0; j &lt; dtRequests.Columns.Count; j++)
                      {
                          switch (dtRequests.Columns[j].ColumnName)
                          {
                              case "Remove":
                                  str = str+"&lt;html&gt;&lt;body&gt;&lt;input type='checkbox' value='TRUE'&gt;&lt;/body&gt;&lt;/html&gt;";
                                  break;
                              default:
                                  str = str + Convert.ToString(dr[j]);
                                  break;
                          }
                          Response.Write(str);
                          str = "\t";
                      }
                      Response.Write("\n");
                  }
                  Response.End();
  </code></pre>