sivakumar k
- May 11th, 2007
FileName = "C:external.xls"
Set XLconn = CreateObject("ADODB.Connection")
XLconn.ConnectionString = "DBQ=" & FileName & ";DRIVER={Microsoft Excel Driver (*.xls)};"
XLconn.Open
XLsql = "SELECT * FROM [Sheet1$]"
Set XLrs = CreateObject("ADODB.Recordset") 'Recreate the recordset
XLrs.cursortype = 3
XLrs.open XLsql, XLconn
Xlrs.movefirst()
MsgBox(XLrs(0).value) ----> we can supply this value as parameter.
While not XLrs.eof
MsgBox(XLrs(0).value)
Xlrs.movenext()
Wend
How do you data drive an external spreadsheet?