• Importing Data From an Excel SS using VBA (Access 2000 SR1)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Importing Data From an Excel SS using VBA (Access 2000 SR1)

    Author
    Topic
    #383035

    Hello,

    I am trying to write a procedure that would allow the user to navigate out to an excel spreadsheet and import it into the DB. The spreadsheet has a consistent format that matches the table that it will be imported into. What is the best way to do this.

    In Excel, you can use the “Application.GetOpenFilename” function to navigate and select files.

    Any suggestions will be appreciated.

    Regards,

    Viewing 2 reply threads
    Author
    Replies
    • #651654

      There is a TransferSpreadsheet command which should do what you want.
      Pat smile

    • #652185

      Access didn’t use to have the equivalent of GetOpenFilename (I think I read somewhere that Access XP has one, but I’m not sure). I use API calls to present an “Open” dialog to the user. See for instance post 188202.

    • #652256

      I often use the File Import function to import a spreadsheet into Access. I always give it the same name. (ok) Then run an append Query to attach it to the existing table.
      Is this anything like what you are trying to do?

      • #652549

        Yes, this is exactly what I am trying to do. But I want to provide an interface so that the user can navigate to the file that will be imported. Once the file is selected, the Import should be automatic.

        Thanks,

    Viewing 2 reply threads
    Reply To: Importing Data From an Excel SS using VBA (Access 2000 SR1)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: