Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2008
    Posts
    74

    Exclamation Unanswered: TransferSpreadsheet problem - the second sheet can't be imported

    Hi, everyone!

    I've got an Excel file with two worksheets that are called 'ITKosten' and 'ISKosten', and I need to import it into two separate Access tables. The first worksheet goes flawlessly, but I can't get to import the second worksheet.

    For the code (nearly identical to the import of the first sheet):

    Code:
    DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, _
                                                "IT", vrtSelectedItem, False, "ITKosten!A1:I80000"
    I get the following error message:

    Error '3011': The Microsoft Jet-Database modul couldn't find the object 'ITKosten!A1:I80000'.

    Why not????

    Any help would be greatly appreciated!

    Best,
    OfficeDummy
    Last edited by OfficeDummy; 01-28-08 at 05:14.

  2. #2
    Join Date
    Jan 2008
    Posts
    74

    Exclamation

    *shamelessly bumping the thread because no help is coming*

    People, please! Nothing I do seems to work, and I really need this import.

    I tried reducing the range to A1:I1000, and replacing '!' with $ in the second sheet, but as mentioned above, nothing works.

    Any suggestions??? Please?

    Best,
    OfficeDummy

  3. #3
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    You have two topics the same, that is why this one was ignored.

    I believe your sheet names have to have quotes... but it's been a long time since I have done any automated XL importing.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  4. #4
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,424
    Provided Answers: 8
    Have you try to just Link the excel files to the database

    them run a query to mktable or update
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  5. #5
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I thought linked tables sourced from Excel spreadsheets were read-only
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  6. #6
    Join Date
    Jan 2008
    Posts
    74
    To be honest, I'm inclined to import them, not link...

    Miraculously, everything works now, although I haven't changed anything in the code.

    It's still interesting to know, what the problem was if it occurs again

Posting Permissions

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