ADO and Excel 2k[RESOLVED for now]
I am connecting to an Excel spreadsheet using ADO,
but the resulting recordset only has values for the text cells
and not any date or numeric cells. I don't see why the recordset
is not picking up the cells other than text.
Any ideas???
Code:
Dim sSQL As String
Dim oRsE As ADODB.Recordset
Dim oCnnE As New ADODB.Connection
oCnnE.ConnectionString = "Provider = Microsoft.Jet.OLEDB.4.0; DATA Source="
& frmMain.lblSVR_Path.Caption & ";Extended Properties=Excel 8.0;"
oCnnE.Open
sSQL = "SELECT"
sSQL = sSQL & " *"
sSQL = sSQL & " FROM"
sSQL = sSQL & " [Worksheet]"
Set oRsE = New ADODB.Recordset
oRsE.Open sSQL, oCnnE, adOpenStatic, adLockReadOnly, adCmdText
If IsDate(oRsE!F1) = True Then...
The F1 Field contains several rows of dates and they all come in as Null.
Thanks for any help.