Hi,
Is there any mechanism for saving an excel file automatically. The Code which i used for Generting Excel file is
[CODE]
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()
[CODE]
_strBuild contains the information to be displayed in the excel
The above code when i use it prompts user for open/save an excel file. Is the any mechanism for saving an excel file automatically
Thanks in Advance


Reply With Quote


