Results 1 to 4 of 4

Thread: Excel & Recordset problem

  1. #1

    Thread Starter
    Hyperactive Member naruponk's Avatar
    Join Date
    Feb 2004
    Location
    Some where in the world
    Posts
    423

    Question Excel & Recordset problem

    Hi all,

    How can i access Excel file using ADO;
    Am i right to open a connection?

    Dim cn As New ADODB.Connection
    Dim strcn As String
    strcn = "Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=N:\Reject_May.xls;DefaultDir=" & App.Path & ";"
    cn.Open strcn
    ' then how to open a recordset ?

    Thanks

  2. #2

  3. #3

    Thread Starter
    Hyperactive Member naruponk's Avatar
    Join Date
    Feb 2004
    Location
    Some where in the world
    Posts
    423
    Thanks you Garratt

  4. #4

    Thread Starter
    Hyperactive Member naruponk's Avatar
    Join Date
    Feb 2004
    Location
    Some where in the world
    Posts
    423
    Hey guys,

    but how can i transfer data from excel file to table in access?

    like this in DAO

    do while not xrs.eof
    rs.addnew
    rs.fields!fname=xrs.fields!firstname
    rs.update
    xrs.movenext
    loop

    thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width