A simpler way to achive this is to set content type to excel and output data in tabular format as below..
Code:
<%
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition","attachment; filename=export.xls"
Response.Write("<table border=1>")
Response.Write("<tr><td>a</td><td>b</td><td>c</td></tr>")
Response.Write("<tr><td>1</td><td>2</td><td>3</td></tr>")
Response.Write("<tr><td>x</td><td>y</td><td>z</td></tr>")
Response.Write("</table>")
%>
When outputting data as Excel, be sure to remove most HTML tags and only use tags that control format or layout of that data.
Hope this helps!