I have the following VBScript code:
For some reason when the page is called instead of passing the below listed filename it shows part of the page's URL which will not work with Excel.
' set the filename to statement.xls
Response.AddHeader "Content-Disposition", "filename=statement.xls"
' set the mime type to Microsoft Excel
Response.ContentType = "application/vnd.ms-excel"