Results 1 to 3 of 3

Thread: How to read Excel data into Access

Hybrid View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Location
    US, PA
    Posts
    79

    How to read Excel data into Access

    I have excel workbooks in a folder. I would like to read them into an Access database. I have 15 columns in the excel workbook, I created the same number of columns in Access.

    All I want to do is to read in the value. I tried the transferspreadsheet command and its not working.

    What is the easy way to read the data into Access. I want to do this programatically.

    Thanks in advance,

    Reggie

  2. #2
    Addicted Member
    Join Date
    Oct 1999
    Location
    Brossard, Québec, Canada
    Posts
    241

    post your code

    Please post your code for the TransferSpreadsheet....

    It is supposed to work... i have used it several times

    Dave

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Location
    US, PA
    Posts
    79
    Dim sPath As String
    Dim CurrFile
    ' txtPath = "I:\Reggie_DCI\Dan_Test\"
    sPath = txtPath

    'Find the first file in the directory

    CurrFile = Dir(sPath)

    Do While Len(CurrFile) > 0
    DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel97, "DAN_EXCEL", sPath & CurrFile, 0

    CurrFile = Dir
    Loop

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