Results 1 to 6 of 6

Thread: Link excel file

  1. #1
    Join Date
    Apr 2005
    Location
    Athens, Greece
    Posts
    14

    Unanswered: Link excel file

    Hi all!
    I have a db which data are linked with an excel file through the "link table" option. It is about a site, this is done locally and works fine.

    However, I am trying to find a way to update the db by linking a new updated excel file every time remotely.

    What path shall I use in access to achieve that? Or is there any other way to import automatically the excel file?

    Thank u in advance,
    Martha

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    So the filename is going to change, or is the data in the same file changing?
    George
    Home | Blog

  3. #3
    Join Date
    Apr 2005
    Location
    Athens, Greece
    Posts
    14
    The data in the same file is changing. But I dont know how am I supposed to link the excel file. Remember, it is about a site, so I want this to take place remotelly, not in my local pc.

    Thanks for your time

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    So you programmatically want to link a static excel file to an Access database...
    Well, I'd suggest that you don't link the file, rather you import the data into a table that you create.
    Then take a look at the following command in VBA:
    Code:
    DoCmd.TransferSpreadsheet
    The Access helpfile will give you the rest of the information you need on this command!

    HTH - GeorgeV
    George
    Home | Blog

  5. #5
    Join Date
    Apr 2005
    Location
    Athens, Greece
    Posts
    14
    Thanks for your reply.

    I did search the helpfile which says the following
    HTML Code:
    Example
    The following example imports the data from the specified range of the Lotus spreadsheet Newemps.wk3 into the Microsoft Access Employees table. It uses the first row of the spreadsheet as field names.
    
    DoCmd.TransferSpreadsheet acImport, 3, _
        "Employees","C:\Lotus\Newemps.wk3", True, "A1:G12"
    Problem is that as it says, I still have to specify a path. What is that, since the file is on the web server.
    Secondly, one more thing; I need access to import it automatically (everytime the excel file is uploaded). What do I have to do?

    Thanks again

  6. #6
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Well, if you want it to happen everytime the file is uploaded, this doesn't sound like a Access problem, more of a web issue. How is Access supposed to detect a new version? It could periodically import the file on a timer event, but timer events in Access and websites do not mix well!

    What language is your website programmed in? Sounds like we need to find a way of importing the spreadsheet to your db.
    George
    Home | Blog

Posting Permissions

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