|
| |
|
|
chadb
Posts: 501 From: Kansas Status: offline
|
Output Excel Header Row Names - 6/24/2009 10:11:18
Is there way to to custom name the header row in Excel? Also format a column? Here is how I am doing it: sql = request.form("sqlcmd") set Conn=server.createobject("adodb.connection") Conn.open DSN Set RS = Conn.Execute (SQL) Dim F, Head For Each F In RS.Fields Head = Head & ", " & F.Name Next Head = Mid(Head,3) & vbCrLf Response.Addheader "Content-Disposition", "inline; filename=OperationHrs.csv" Response.ContentType = "application/download" Response.Write Head Response.Write Replace(Replace(RS.GetString(,,"QQQQ",vbCrLf,""),",","-"),"QQQQ",",") 'Response.Write RS.GetString(,,", ",vbCrLf,"") Set RS = nothing Conn.close Thanks Chad
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|