Como posso criar mais que um sheets
convertendo diferentes datatable
para excel?
Meu código:
DataTable dt = new DataTable();
dt = Tr.Get();
GridView x = new GridView();
x.DataSource = dt;
x.DataBind();
Response.Clear();
x.HeaderStyle.Font.Size = 8;
x.RowStyle.Font.Size = 10;
Response.AddHeader("content-disposition", "attachment;filename=s.xls");
Response.ContentType = "application/excel";
StringWriter stringWriter = new StringWriter();
HtmlTextWriter htmlTextWriter = new HtmlTextWriter(stringWriter);
x.RenderControl(htmlTextWriter);
Response.Write(stringWriter.ToString());
Response.End();