Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO and Excel 1

Status
Not open for further replies.

RobS23

Programmer
Jun 4, 2001
161
GB
How do I set up an ADO connection to an Excel Spreadsheet so that it it can be manipulated as would a db recordset?
 
Use this...
Const adOpenStatic = 3
Const adUseClient = 3
Const adLockPessimistic = 2

set rs=server.CreateObject("ADODB.Recordset")
path=server.mappath("template.xls")

Set EConnection = Server.CreateObject( "ADODB.Connection" )
EConnection.Open "Driver={Microsoft Excel Driver (*.xls)};DBQ="&path&";ReadOnly=0;UID=admin;"

________

George
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top