public static void ExcelPrintWithSubReport(string SpName, DataTable dataSource)
{
GridView gv = new GridView();
gv.DataSource = dataSource;
gv.DataBind();
SpName = SpName + ".xls";
HttpContext context = System.Web.HttpContext.Current;
context.Response.ClearContent();
context.Response.Buffer = true;
context.Response.AddHeader("content-disposition", "attachment; filename= CheckData.xls");
context.Response.ContentType = "application/ms-excel";
context.Response.Charset = "";
StringWriter sw = new StringWriter();
HtmlTextWriter htw = new HtmlTextWriter(sw);
gv.RenderControl(htw);
context.Response.Output.Write(sw.ToString());
context.Response.Flush();
htw.Close();
sw.Close();
context.Response.End();
}// End of Method
Tuesday, December 31, 2019
Datatable to excel Download
Subscribe to:
Post Comments (Atom)
Screen Record
Windows Screen Record WindowsKey+ Alt + R Recording Starts.
-
https://jwt.io/ J SON Web Tokens are an open, industry standard RFC 7519 method for representing claims securely between two parties.
-
public void ProcessOrder(int orderId, bool applyDiscount) { if(applyDiscount) { //Apply Discount to the order }...
No comments:
Post a Comment