Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003
    Posts
    3

    Red face Unanswered: Import Excel to Access Table

    Hello,

    I want to use Vb to import excel file with column header to Access 2000.

    Can anybody help here?

    ac.DoCmd.TransferSpreadsheet acImport, _
    acSpreadsheetTypeExcel9, "BATCH(821)", "G:BATCH(821).XLS", True

    I cannot use the above one to import.

    Thanks.

  2. #2
    Join Date
    Sep 2003
    Location
    T.O.
    Posts
    326
    What is ac in ac.DoCmd? Is this an access object variable, and if so, how have you declared it, set it, and opened it? Is there a specific reason why you are using the parameter acSpreadsheetTypeExcel9?
    All code ADO/ADOX unless otherwise specified.
    Mike.

  3. #3
    Join Date
    Apr 2003
    Posts
    280
    What is the purpose of importing it? You can also link to the excel data, so you won't have to import it everytime.

Posting Permissions

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