Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2003
    Washington, USA
    Thanked 0 Times in 0 Posts

    Export to Excel - to a specific field range (Accesss 2k)

    I have to create a process to take data from Access to put into an Excel Wkbook.

    The workbook will consist of 1 wksheet per clinic and 1 wkbook(All Clinics) per month of the year. Each workbook will be stored in a central location in a MonthYr folder. ( ie. Jan 2004, Feb 2004, etc.)

    I am looking for code that will enable me to update the Excel worksheets - not using a link back to Access - but a dump of the actual data into specified cells(range). How do I automate this process when the file names will be changed each month?

    Can anyone point me in the right direction?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: Export to Excel - to a specific field range (Accesss 2k)

    This is probably easier to do from the Excel side than from the Access side. The Range object in Excel has a CopyFromRecordset method that can be used to import data from an Access table or query into a specified location in an Excel worksheet. If you prefer, you can control this from Access using Automation. Moderator <!profile=WendellB>WendellB<!/profile> has a tutorial on Automation on his website - see his profile for a link, and look for Support > Tutorials.

Posting Permissions

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