Hi there ,
Can anyone help me out!!
I have a report (basically retrieving of records from the database and show it in a htm table format)
which is displayed on the browser as htm table..
Now my problem comes here..
I was asked to program such that the report is shown in excel rather than as html table..
with great enthusiasm I started working only to find out i am not able to do..
when I click on the button, the excel is opening, but only that it is completely blank and not showing any records
if i turn off content type, then I am able to display in html table..
Pls help me out!!
the delivarable is only a day away:(
I am posting my code here :
on top of page i added this
Thanks very much in advance
Regards
Can anyone help me out!!
I have a report (basically retrieving of records from the database and show it in a htm table format)
which is displayed on the browser as htm table..
Now my problem comes here..
I was asked to program such that the report is shown in excel rather than as html table..
with great enthusiasm I started working only to find out i am not able to do..
when I click on the button, the excel is opening, but only that it is completely blank and not showing any records
if i turn off content type, then I am able to display in html table..
Pls help me out!!
the delivarable is only a day away:(
I am posting my code here :
on top of page i added this
Code:
<% Response.Buffer = TRUE Response.ContentType = "application/vnd.ms-excel"%> After that the record set is retreived like this: <tr valign=top> <% while iCnt <=7%> <td > <table border="1" cellpadding="0" cellspacing="0" width=100% class=formtable> <%str = "Exec sp_printanydate '" & cdate(request("StartDate"))& "', '" & request.QueryString("cid") & "', "& iCnt&" " rs.Open str,conn,1,3 while not rs.EOF %> <tr valign=top > <td valign=top bgcolor=<%=color_value%> > <%if isnull(rs("subjectname")) then%> - <%else%> <%=rs("subjectname")%> <%end if %> <br> <%if isnull(rs("classname")) then%> - <%else%> <%=rs("classname")%> <%end if %> <br> <%=rs("fromtime")%> - <%=rs("totime")%><br> <%if isnull(rs("room")) then%> - <%else%> <%=rs("room")%> <%end if %> <br> </td> </tr> <% rs.MoveNext wend rs.Close %> </table> </td> <%iCnt=iCnt+1 wend%> </tr> </table>
Regards
Comment