PDA

View Full Version : Retrieve data from Ms Excel Sheet


peihun
08-30-2006, 06:40 AM
Hi All,

Please help me!!! I executed this coding, error display:
Error Type:
Microsoft JET Database Engine (0x80004005)
External table is not in the expected format.

This cos by My Daily.xls file (Sheet1) have a table with specific table format.
Can you guide me any ways access this table? :)

<%
Set oConn =Server.CreateObject("ADODB.Connection")
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Inetpub\wwwroot\Daily.xls;" & _
"Extended Properties=""Excel 8.0;"""

Set oRS = Server.CreateObject("ADODB.Recordset")
oRS.Open "Select * from [Sheet1$F1:AN3]", oConn, adOpenStatic

%>