Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2002
    Location
    Phoenix, AZ
    Posts
    122

    Unanswered: transfer from excel

    how could i get this line:

    DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel97, "tblmain", "G:\INDY\STATUS.xls", True, "OPEN!"

    to import from a specific range on my worksheet named 'OPEN'? I have a few lines at the top of the worksheet that i do not want to transfer into Access. So i need the transfer to go from cell A5 to the end of the data on the screen. How could i do that?

  2. #2
    Join Date
    Dec 2002
    Location
    Phoenix, AZ
    Posts
    122
    the data changes daily so typing a static range (like "INV!A5:N212") in the range option would not work.

  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Direct from the help file:

    DoCmd.TransferSpreadsheet [transfertype][, spreadsheettype], tablename, filename[, hasfieldnames][, range]

    Unless you mean you have a varying number of cells to copy, that's pretty damn tricky. For that, you may have to use the excel object library again.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  4. #4
    Join Date
    Dec 2002
    Location
    Phoenix, AZ
    Posts
    122
    yeah- i will have varying number of cells... Not sure how i should approach this thing. Any suggestions would help.

  5. #5
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Open the sheet as an object then and iterate through it as though it were a dataset. I believe there were some suggestions about how to interact with a spreadsheet directly in the last excel thread.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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