i Am using this script to show excell spreadsheet results on Web page at client side but this script use to show complete spreadsheet on a single page and my sheet has maximum of 2000 data records so it looks hard to view such a long page, i want that this script show only 50 resulta of spread sheet data on a single page and place a button of NEXT PAGE to vies next 50 results and so on can any one help me with this script? My codes are: <% Dim objConn, objRS, strSQL Dim x, curValue Set objConn = Server.CreateObject("ADODB.Connection") objConn.Open "DRIVER={Microsoft Excel Driver (*.xls)}; IMEX=1; HDR=NO; "&_ "Excel 8.0; DBQ=" & Server.MapPath("mysheet.xls") & "; " strSQL = "SELECT * FROM A1:Q10000" Set objRS=objConn.Execute(strSQL) Response.Write("<div align=""center"">") Response.Write("<table border=""1"" width=""520"" bordercolor=""#00FF00"">") Response.Write("<tr>") For x=0 To objRS.Fields.Count-1 Response.Write("<th>" & objRS.Fields(x).Name & "</th>") Next Response.Write("</tr>") Do Until objRS.EOF Response.Write("<tr>") For x=0 To objRS.Fields.Count-1 curValue = objRS.Fields(x).Value If IsNull(curValue) Then curValue="N/A" End If curValue = CStr(curValue) Response.Write("<td>" & curValue & "</td>") Next Response.Write("</tr>") objRS.MoveNext Loop objRS.Close Response.Write("</table>") objConn.Close Set objRS=Nothing Set objConn=Nothing %>
Just need to use recordset paging, as explained here: http://www.codeproject.com/KB/database/rspaging.aspx