Explore Response.ContentType
Response.ContentType = “application/vnd.ms-excel”
’Additional Test Code for CSV
’Response.ContentType = “text/plain”
If ReturnXYCoords Then
Response.AppendHeader(“Content-Disposition”, “inline;filename=results.csv”)
Response.Write(GetCSV(records))
Response.End()
End If
http://weblogs.sqlteam.com/travisl/archive/2003/10/27/377.aspx
http://discuss.fogcreek.com/dotnetquestions/default.asp?cmd=show&ixPost=1485
http://www.15seconds.com/issue/970515.htm
Check out how changes to this Response.ContentType can effect the type of results returned to the calling browser.
Response.ContentType = “application/vnd.ms-excel”