PC Review


Reply
Thread Tools Rate Thread

ASP Dynamic Excel Creation

 
 
Chris Oswald
Guest
Posts: n/a
 
      9th Nov 2004
When I dynamically generate my Excel file it prompts me
twice to open it. Any ideas why?

Office 2003
Windows XP
IE 6

Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-
Disposition", "attachment;filename=OSRHistory" &
strVersion & ".xls"

%>
<table border="1">
<tr>
<%
For Each objField In objRS.Fields
%>
<th style="background-
color:gray;color:white"><%=objField.Name%></th>
<%
Next
%>

</tr>

<%
While Not objRS.EOF
%>
<tr>
<%
For Each objField In
objRS.Fields

If (UCASE(objField.Name) = "STATION") Then

%>
<td align="Center"><%="&nbsp;" & CStr
(objField.Value)%></td>
<%
Else
%>
<td><%=objField.Value%></td>
<%
End If
Next
%>
</tr>
<%
objRS.MoveNext

WEnd
%>
</table>
<%
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
dynamic object name creation AMP Microsoft C# .NET 1 4th Sep 2008 04:17 PM
Dynamic Creation of list box on excel sheet and handling events jigs Microsoft Excel Programming 3 18th Jan 2007 09:39 AM
Error in dynamic excel creation ramkumar_cpt Microsoft Excel Discussion 0 9th Dec 2005 02:18 PM
MFC dynamic creation Rajko Microsoft VC .NET 1 14th May 2004 08:20 AM
Dynamic Creation of rows in Excel vikrampn Microsoft Excel Programming 1 17th Dec 2003 08:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:17 AM.