Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create an Excel file (xls)
Message
De
24/03/2008 09:27:40
 
 
À
24/03/2008 09:17:56
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01304564
Message ID:
01304854
Vues:
17
>>Saved in my .Net folder. Muchas gracias Caballero
>>
>>>
>>>Response.Clear()
>>>Response.Charset = String.Empty
>>>Response.ContentType = "application/vnd.ms-excel"
>>>Dim writer As New System.IO.StringWriter
>>>Dim htmlWriter As New System.Web.UI.HtmlTextWriter(writer)
>>>Dim grid As New DataGrid
>>>grid.DataSource = myDataSet.Tables(0)
>>>grid.DataBind()
>>>grid.RenderControl(htmlWriter)
>>>Response.Write(writer.ToString)
>>>Response.End()
>>>
>>>'Add appropriate cleanup code
>>>
>
>No problem. I use it a lot. You really have no options to format the data or columns, but my policy is giving the user their data and letting them do whatever the heck they want with it.
___
Mike,

I have seen an 'export' to excel from asp.net. What stroke me was that there were no columnheaders, nor any formatting. So that answers my question. In time, when I have really gotten around to .net, I'll do something (or at least hope to do), that gives me the excel output I have in my foxpro grid's class. (headers, numberformat with <0 in red, horizontal alignment, and columns.Autofit)
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform