Sayli k

Sayli k

  • NA
  • 23
  • 2.1k

export parent child gridview in excel using c#

Sep 9 2019 7:30 AM
I am using store procedure for retriving data for both parent gridview as welll as child gridview,
 
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
Response.AddHeader("content-disposition", "attachment;filename= = CustomerAging.xls");
Response.ContentEncoding = Encoding.UTF8;
StringWriter tw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(tw);
gridCustomeraging.RenderControl(hw);
Response.Write(tw.ToString());
Response.End(); 

Answers (2)