p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Basics (http://p2p.wrox.com/forumdisplay.php?f=61)
-   -   Issue of downloading Excel file(resent) (http://p2p.wrox.com/showthread.php?t=14051)

zuolinbai June 10th, 2004 01:27 PM

Issue of downloading Excel file(resent)
 
Hi there,
I have an asp program that generate Excel file it works on my local machine even for a big file(3 M). But after It is deployed to web server(IIS 5), it works for a small file(1.7M), but id does not work for a bigger file(3M). I debugged and found out script timeout. So I changed server.scripttimeout into 900 seconds, but it does not work yet. By the way I use HTTPS on server. Any one who knows how to fix it please help. Thanks a lot.
The following code is example of my ASP file.

<%@ Language=VBScript %>
<%response.ContentType="application/vnd.ms-excel"%>
<html>
<head>
<body>
<%

    Rs.Open "strSQL", "cnString"

    if not rs.EOF then
        Response.Write("<table border=1 align=center cellSpacing=0 > ")
        fldsNum=Rs.Fields.Count
        'Display details of the records in the current page
        jj=0
            Response.Write(" <tr> ")

            for i=0 to fldsNum-1
                Response.Write("<td>"&Rs.Fields.Item(i).Name&" </td>")
            next
            Response.Write(" </tr> ")
        while not rs.EOF
            Response.Write(" <tr> ")

            for i=0 to fldsNum-1
                Response.Write("<td nowrap>"&Rs.Fields.Item(i).Value&" </td>")
            next
            Response.Write(" </tr> ")
            Rs.MoveNext()
            jj=jj+1
        wend
        Response.Write(" </table><BR> ")
        Response.Write("<p> Records found: "&jj&"</P><BR><BR>")
    else
        Response.Write("No records are found in this search!")
    end if
    rs.Close
    set rs=nothing
%>
</body>
</html>




Greg Griffiths June 10th, 2004 05:24 PM

check out http://www.greggriffiths.org/webdev/both/excel/ which covers this topic.


All times are GMT -4. The time now is 02:42 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.