mahesh.sanka
02-07-2012, 03:01 AM
Hi,
Is the any mechanism for Saving an Excel file automatically.
The code which i am using for Generating an Excel file is
HttpContext.Current.Response.Clear()
HttpContext.Current.Response.ClearContent()
HttpContext.Current.Response.ClearHeaders()
HttpContext.Current.Response.Charset = ""
HttpContext.Current.Response.Buffer = True
HttpContext.Current.Response.ContentType = "application/vnd.ms-excel"
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=" + lstrExcelFileName)
HttpContext.Current.Response.Write(_strBuild)
HttpContext.Current.Response.Flush()
HttpContext.Current.Response.End()
May I know it is possible or not
Thanks in advance
Is the any mechanism for Saving an Excel file automatically.
The code which i am using for Generating an Excel file is
HttpContext.Current.Response.Clear()
HttpContext.Current.Response.ClearContent()
HttpContext.Current.Response.ClearHeaders()
HttpContext.Current.Response.Charset = ""
HttpContext.Current.Response.Buffer = True
HttpContext.Current.Response.ContentType = "application/vnd.ms-excel"
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=" + lstrExcelFileName)
HttpContext.Current.Response.Write(_strBuild)
HttpContext.Current.Response.Flush()
HttpContext.Current.Response.End()
May I know it is possible or not
Thanks in advance