Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Posts
    6

    Exclamation Unanswered: code to import xls files (urgent please help)

    hey
    is there anyone out there that can help me with code to import xls files into access. i know access has a built in function for it but what im trying to do is to make a switchboard with a command button that:

    1. imports a selected xls file
    2. appends the file to the main table
    3. ensures the field names are the same as the main table

    any help would be great guys
    thanx
    Last edited by -nj-; 02-24-04 at 11:31.

  2. #2
    Join Date
    Feb 2004
    Posts
    8
    You can do this by using a macro. Use the Transfer Spreadsheet function in the macro. Specify the name of the Excel file in the macro itself. Attach the macro to the switchboard.

  3. #3
    Join Date
    Feb 2004
    Location
    Wales
    Posts
    343
    Originally posted by Shubharaj
    You can do this by using a macro. Use the Transfer Spreadsheet function in the macro. Specify the name of the Excel file in the macro itself. Attach the macro to the switchboard.

    Just a cautionary note here. I have to frequently import .xls in to a specific table and has already been pointed out the transfer spread' is the main tool but you stated that you want this system to ensure that the table has the correct record based on the spreadsheet! Does this mean that the sourse spreadsheets layout is likely to change - if it is then you could encounter problems in the upload process i.e. people have been known to "stick" a column in here and there and that will crash the process for you or some one will decide to change the format of a data range maybe because some of the xls data has itself been imported - (off on-line sources) therefore just beware of the protocols used in the source data - saves many a painkiller having to be taken

    hope this might spark a note of awarness?

    regards
    gareth

Posting Permissions

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