468,771 Members | 1,820 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,771 developers. It's quick & easy.

Autofilter headers with dynamic html

Hi,

I am using the code below to dynamically build an html table and write
it to excel an excel spreadsheet. This code works great except that I
need the headers use AutoFilter on the headers, but I can't figure out
how to perform this. I have a template that has the headers with
autofilter turned on, but when I click on the cell, no formula is
displayed.

sb.Append("<tr><td align=""center"">")
sb.Append(dr.Item("FirstName").ToString.Trim)
sb.Append("</td><td>")
sb.Append(dr.Item("LastName").ToString.Trim)
sb.Append("</td><td>")
sb.Append(dr.Item("Store"))
sb.Append("</td><td>")
sb.Append(dr.Item("OOQ"))
sb.Append("</td><td>")
sb.Append(dr.Item("FOQ"))
sb.Append("</td><td>")
sb.Append(dr.Item("Diff"))
sb.Append("</td></tr>")
sb.Append(vbCrLf)

Response.AddHeader("content-Type", "application/ms-excel")
Response.AddHeader("content-disposition", "attachment;
filename=OrderstagingperformanceReport.xls")
Response.AddHeader("Content-Length", sb.Length)
Response.Write(sb.ToString())

When I view the source of a correct spreadsheet with data, the td for
the FirstName column is:

<td height=18 class=xl24 id="_x0000_s1025" x:autofilter="all"
x:autofilterrange="$A$1:$F$1" width=94
style='height:13.5pt;width:71pt'>FistName</td>

I'm just not sure how to get this into my dynamic html. Any
suggestions and/or examples would be greatly appreciated!

Thanks,
Amy B
Nov 18 '05 #1
0 1984

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Matthew Kramer | last post: by
1 post views Thread by Steven Britton via AccessMonster.com | last post: by
2 posts views Thread by JM | last post: by
1 post views Thread by Bora Turan | last post: by
1 post views Thread by =?Utf-8?B?S2l0dHlIYXdr?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.