
28/07/2008, 14:25
|
| | Fecha de Ingreso: enero-2008
Mensajes: 144
Antigüedad: 17 años, 2 meses Puntos: 2 | |
Respuesta: Mensaje al abrir creado desde c# HOOLA YO HAGO ESTO EN C# 2003 OJALA TE SIRVA
Response.Clear();
Response.AddHeader("content-disposition", "attachment;filename=NombreArchivo.xls");
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.No Cache);
Response.ContentType = "application/vnd.xls";
//para que no salgan esos malditos signos
Response.ContentEncoding = System.Text.Encoding.UTF7;
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
this.Datagrid1.RenderControl(htmlWrite);
Response.Write(stringWrite.ToString());
Response.End();
PRUEBALO Y ME DICES
SUERTE!!!!! |