Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Autoformat headers with dynamic

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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
autoformat Jim Excel Discussion (Misc queries) 1 June 4th 09 06:18 PM
lookup using column headers and row headers Memphus01 Excel Discussion (Misc queries) 1 April 13th 09 04:57 PM
Autoformat Ajax Excel Worksheet Functions 2 November 14th 07 05:34 PM
modify autoformat Ashoke Excel Discussion (Misc queries) 1 January 28th 05 02:55 PM
Better support for dynamic content within headers and footers Anvil Scott Excel Discussion (Misc queries) 1 December 21st 04 08:33 PM


All times are GMT +1. The time now is 09:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"