% Dim oADO, sConnection, sSQL, rsSheet, aVals Dim x, y sConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=excel\file.dvr.xls;Extended Properties=""Excel 8.0;HDR=No;IMEX=1""" sSQL = "SELECT * FROM [Sheet1$]" Set oADO = Server.CreateObject("ADODB.Connection") oADO.Open sConnection Set rsSheet = oADO.Execute(sSQL) If Not rsSheet.EOF Then aVals = rsSheet.GetRows() rsSheet.Close : Set rsSheet = Nothing oADO.Close : Set oADO = Nothing If IsEmpty(aVals) Then Response.Write "The worksheet is blank." Response.End End If %>
This sample shows how to mimic XML Data Islands in Mozilla with tables. This sample code is not meant for production use as it is very fragile as it stands here (very primitive browser capability test, requires certain template table layout and so on).
<%=aVals(i, 0)%> | <% Next %>
<%=aVals(x, y)%> | <% Next %>