G
Guest
The following piece of code is being used to export HTML to excel.
HttpContext.Current.Response.ContentType = "application/vnd.ms-excel"
HttpContext.Current.Response.AddHeader("content-disposition",
"attachment;filename=ABC.xls")
HttpContext.Current.Response.Write(strHTML)
HttpContext.Current.Response.End()
However when the user tries to save it the Default File Type is Web
Page(*.htm; *.html)
How do we change the Default File Type to Excel
HttpContext.Current.Response.ContentType = "application/vnd.ms-excel"
HttpContext.Current.Response.AddHeader("content-disposition",
"attachment;filename=ABC.xls")
HttpContext.Current.Response.Write(strHTML)
HttpContext.Current.Response.End()
However when the user tries to save it the Default File Type is Web
Page(*.htm; *.html)
How do we change the Default File Type to Excel