Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004

    Unanswered: Import from Excel

    First off, I'm not a programmer so please bear with me. Maybe I'm asking for too much here but what I’m looking for is some routine to assist in importing data from an Excel spreadsheet. I can do this all manually but have no idea where to begin to automate this. Here's what I do manually (from inside Access2K):

    Click on FILE > GET EXTERNAL DATA > IMPORT > c:\paser\wislr.xls > Next
    Check "Show range names" > WISLR > Next
    Cheek “First row contains column headings” > Next
    Check "In a new table" > Next
    Check "No primary key" > Next
    Import to table = tblWISLR > Finished

    Any help would be greatly appreciated.


  2. #2
    Join Date
    Feb 2002
    I'm not sure how to import directly from and excel file (I dont think it is possible) but if you save the excel file as a csv or txt file you can use this.

    DoCmd.TransferText acImportDelim, "PriceFileImport Import Specification", "ImportPartsPricing", [varPathtoDataFiles] & "PriceFileImport.csv",TRUE , ""

    The true at the end indicates the "First row contains column headings"
    The "PriceFileImport Import Specification" is the name id the Import Specification to use, it indicates the text delimiters etc...

    The "ImportPartsPricing" is the table to import into
    The "[varPathtoDataFiles] & "PriceFileImport.csv" is the path and filename to import.

    Hope this helps...

  3. #3
    Join Date
    Jul 2004
    South Dakota
    Just look this up in the help and you should have no problem.


    Write back if you do.


  4. #4
    Join Date
    Jan 2004
    Excellent - This gives me a great idea.

    Thanks for the reply,

Posting Permissions

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