Ciao a tutti!!

Con il seguente codice si riesce a scrivere in Excel,
---------------------
' CODE-1
Response.Clear()


' CODE-2
Response.AddHeader("Content-Disposition", "attachment; filename=esempio.xls")
Response.ContentType = "application/vnd.ms-excel"



' CODE-3
Response.Write("<table><tr><th>esempio</th><th>file excel</th></tr><tr><td>ciao mondo</td><td>123456</td></tr></table>")
Response.End
----------------------

ma se al posto di scriverci con una response.write utilizzo un dataset, al momento di aprire excel mi dice che non riesce ad aprire il foglio.

Avete qualche idea?