This solution was found on http://razvan.cosma.name/weblog/index.php?entry=entry090116-161656

private void ExportToExcel(string strFileName, GridView gv)
        {
            Response.ClearContent();
            Response.ContentType = "application/excel";
            Response.AddHeader("content-disposition", "attachment; filename=" + strFileName);
            Response.Charset = "";         
            Response.ContentEncoding = System.Text.Encoding.Unicode;
            Response.BinaryWrite(System.Text.Encoding.Unicode.GetPreamble());
            this.EnableViewState = false;
            System.IO.StringWriter sw = new System.IO.StringWriter();
            HtmlTextWriter htw = new HtmlTextWriter(sw);
            gv.RenderControl(htw);
            Response.Write(sw.ToString());    
            HttpContext.Current.ApplicationInstance.CompleteRequest();
        }