The comrades of the beginner ASP will encounter such a problem, which is how to import the data of the SQL database into Excel. There are a lot of methods on the network, here to introduce a very simple method, I don't dare to say the simplest, huh, huh.
Add the following three statements in the beginning of the ASP file.
Response.buffer = trueresponse.addheader "Content-Disposition", "attachment" response.contentType = "Application / VND.MS-Excel"
<%
Response.buffer = trueresponse.addheader "Content-Disposition", "attachment" response.contentType = "Application / VND.MS-Excel"
%>
In this way, when the client opens this file, it will be prompted to download to the local, of course, this requires the client to install Excel software (should be this is not a problem, huh, huh).
http://community.9cbs.net/expert/topic/3117/3117968.xml?temp=3.300112e-02