Ver Mensaje Individual
  #4 (permalink)  
Antiguo 01/04/2005, 09:18
Avatar de grisel
grisel
 
Fecha de Ingreso: diciembre-2004
Ubicación: Mexico
Mensajes: 215
Antigüedad: 19 años, 4 meses
Puntos: 0
Hola

Prueba con esto:

En el evento click del boton para exportar coloca este codigo

Response.Clear ();
Response.Buffer = true;
Response.AddHeader ("Content-Disposition","attachment;filename =Nombre.xls");
Response.Charset = "UTF-8";
Response.ContentEncoding = System.Text .Encoding .Default ;

DataGrid1.AllowPaging = false;
DataGrid1.AllowSorting = false;
DataGrid1.DataBind ();
System.IO .StringWriter tw = new System.IO.StringWriter ();
System.Web .UI .HtmlTextWriter hw = new HtmlTextWriter (tw);
DataGrid1.RenderControl (hw);
Response.Write (tw.ToString ());
Response.End ();

Checalo y me dices si te sirvio o no
__________________
grissss :Zzz: