What is preventing you from exporting more than 10,000 rows? Are you getting an error message?My guess is that you're exceeding a memory limit in your application by writing all that HTML. A few things you can do:1. Don't include the font information for every <TD> element. It's wasteful and unnecessary (especially for an Excel sheet). I made a modification to the code if you absolutely have to have it.2. Learn to use the GetRows and GetString methods of the Recordset object. They are MUCH faster and more efficient that using a While loop. Code modification below.3. Don't use ASP to export formatted data to Excel. If you can, use Reporting Services for formatted reports, or export to a simple CSV file. This is especially true if you have many custom reports and have to program them separately.Here are some code fixes that may alleviate your problem. As I said in #3, this is still not a recommended practice:<%call OpenDB22()sql= "select userid,password,username,registerdate,status,rights from inhouse_db.dbo.app_auth"set rs=Conn1.Execute(sql)data=rs.GetString(2,,"</td><td>","</td></tr><tr><td>"," ")rs.CloseConn1.closeset rs=nothingset Conn1=nothingResponse.ContentType = "application/vnd.ms-excel"Response.AddHeader "Content-Disposition", "attachment; filename=Enquiry_List.xls"if data <> "" thenresponse.write "<table border=1 style='font-family:Calibri;color:blue;font-size:12pt;text-align:left;'><tr><td>" & left(data,len(data)-len("<tr><td>")) & "</table>"end if%>It's possible this still won't work due to some internal limit of the Excel MIME type, or other memory issues. If that's the case you need to look at the options I listed in #3.Here's a link on the GetString method: http://www.w3schools.com/ado/met_rs_getstring.asp