0
Good morning. I created a gridview with data from a table When I run the function to generate the Excel spreadsheet, nothing happens, could anyone give a help in what might be happening? follows code
private void ExportaExcel()
{
string Arquivo = "RelNovosFuncionarios.xls";
string attachment = "attachment; filename=" + Arquivo;
Response.ClearContent();
Response.AddHeader("content-disposition", attachment);
Response.ContentType = "application/ms-excel";
System.IO.StringWriter sw = new System.IO.StringWriter();
HtmlTextWriter htw = new HtmlTextWriter(sw);
gvClientes.RenderControl(htw);
Response.Write(sw.ToString());
Response.End();
}
public override void VerifyRenderingInServerForm(Control control)
{
}