Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
autoformat | Excel Discussion (Misc queries) | |||
lookup using column headers and row headers | Excel Discussion (Misc queries) | |||
Autoformat | Excel Worksheet Functions | |||
modify autoformat | Excel Discussion (Misc queries) | |||
Better support for dynamic content within headers and footers | Excel Discussion (Misc queries) |