473,473 Members | 2,255 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 2092

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Matthew Kramer | last post by:
I have two questions: 1) Does anyone know how to do the equivalent of an autofilter in Excel but in an Access table? This enables you to see a list of all the types of names or categories in...
3
by: rquinnan | last post by:
Good Evening all, I would greatly appreciate any assistance on this Access 2003 quandary I'm in. And I do apologize if this has been answered somewhere else, I didn't see one that addressed my...
1
by: Steven Britton via AccessMonster.com | last post by:
Follow Up question to the below posted by Allen Browne on 02/06/2005 - Could something like this work for a form that has a subform and the subform is a datasheet? ...
2
by: JM | last post by:
Anyone know how to do an autofilter on a workbook in C#? Any snippets of code or reference material would be helpful!
1
by: Bora Turan | last post by:
Hi, how to dynamically supply value for the title element in HTML headers section.. thanks in advance
1
by: doug9149 | last post by:
Hello all, I've got some code I wrote using VBA for Excel that I'm trying to recreate using C#.NET. The code autofilters 1 entire column from 1 Worksheet from a Workbook and then appends this...
1
by: =?Utf-8?B?S2l0dHlIYXdr?= | last post by:
I have a simple question that I would like some opinions on regarding common web site headers. I have several web sites (IIS 6), spread across different physical machines that have the same web...
4
by: rnot | last post by:
Hello, I would like to paste data at a cell found by the Selection.Autofilter function. My two first columns hold a "scenario" and "replication" data. I would like upon running a macro to...
1
by: bluejeanbaby | last post by:
Hi I'm trying to format an Excel file from within VB.NET 2008 (Framework 2.0). I'm not very familiar with Excel but have taken existing working code from an old VB6 program and am "tweaking" it...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.