try this on button click
Response.Clear()
Response.AddHeader("content-disposition", "attachment;filename=FileName.xls")
Response.Charset = ""
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Response.ContentType = "application/vnd.xls"
Dim stringWrite As New System.IO.StringWriter()
Dim htmlWrite As System.Web.UI.HtmlTextWriter = New HtmlTextWriter(stringWrite)
Dim dg As System.Web.UI.WebControls.GridView = New System.Web.UI.WebControls.GridView()
dg.DataSource = grid.DataSource
dg.DataBind()
dg.RenderControl(htmlWrite)
Response.Write(stringWrite.ToString())
Response.End()